command

package
v0.0.0-...-291624d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOpts

func ParseOpts(opts []string) locator.OptionConfig

Parses option/flag arguments given after path e.g -v, -h.

func Usage

func Usage()

Print the basic usage on stdout

Types

type Arguments

type Arguments struct {
	SearchString string
	Directory    string
	Options      locator.OptionConfig
}

func ParseArgs

func ParseArgs() (Arguments, bool)

ParseArgs uses os.Args and parses the flags provided. If the flags(n) given are 0=n<2 then we print the usage to stdout, else we parse, assert and return the args

type Parser

type Parser interface {
	ParseArgs() (Arguments, bool)
	ParseOpts(opts []string) locator.OptionConfig
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL