Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHelp ¶
func AddHelp(seperator, help string)
AddHelp adds indented documentation to flag.Usage.
func CheckNoArgs ¶
func CheckNoArgs() error
CheckNoArgs checks if any positional arguments were provided and if so, exit with error.
Types ¶
type Map ¶
Map is a type used to provide mapped options via command line flags. It implements the flag.Value interface. If a flag is passed without a value, for example: `-option somebool` it will still be initialized, so you can use `_, ok := option["somebool"]` to check if it exists.
func (Map) Set ¶
Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag. It still initializes flags that don't explicitly set a string
type StringArrayOption ¶
type StringArrayOption []string
StringArrayOption is a type used to provide string options via command line flags.
func (*StringArrayOption) Set ¶
func (a *StringArrayOption) Set(value string) error
Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag.
func (*StringArrayOption) String ¶
func (a *StringArrayOption) String() string
String is the method to format the flag's value, part of the flag.Value interface. The String method's output will be used in diagnostics.