Documentation
¶
Index ¶
- type ANSICode
- type ArgParser
- func (ap *ArgParser) AddCommand(name string, help string) error
- func (ap *ArgParser) AddFlag(name string, help string, abbr rune) error
- func (ap *ArgParser) AddOption(name string, help string, abbr rune, defaultsTo string, allowed []string) error
- func (ap *ArgParser) Help()
- func (ap *ArgParser) Init(name string, description string)
- func (ap *ArgParser) Parse() (*ArgResults, error)
- type ArgResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ANSICode ¶
type ANSICode string
const ( ANSIDefault ANSICode = "\033[39m" ANSIBGDefault ANSICode = "\033[49m" ANSIBlack ANSICode = "\033[30m" ANSIRed ANSICode = "\033[31m" ANSIGreen ANSICode = "\033[32m" ANSIYellow ANSICode = "\033[33m" ANSIBlue ANSICode = "\033[34m" ANSIMagenta ANSICode = "\033[35m" ANSICyan ANSICode = "\033[36m" ANSIWhite ANSICode = "\033[37m" ANSIBGBlack ANSICode = "\033[40m" ANSIBGRed ANSICode = "\033[41m" ANSIBGGreen ANSICode = "\033[42m" ANSIBGYellow ANSICode = "\033[43m" ANSIBGBlue ANSICode = "\033[44m" ANSIBGMagenta ANSICode = "\033[45m" ANSIBGCyan ANSICode = "\033[46m" ANSIBGWhite ANSICode = "\033[47m" )
type ArgParser ¶
type ArgParser struct {
CommandRequired bool
CommandsHelpMsg string
FlagsHelpMsg string
OptionsHelpMsg string
Colors bool
TitleColor ANSICode
DescriptionColor ANSICode
HeaderColor ANSICode
CommandColor ANSICode
CommandDescriptionColor ANSICode
FlagColor ANSICode
FlagDescriptionColor ANSICode
OptionColor ANSICode
OptionDescriptionColor ANSICode
OptionAllowedColor ANSICode
// contains filtered or unexported fields
}
func (*ArgParser) Parse ¶
func (ap *ArgParser) Parse() (*ArgResults, error)
Click to show internal directories.
Click to hide internal directories.