Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdListToArray ¶
Types ¶
type Command ¶
type Command struct {
Func func(progname string, args []string)
Help string
Usage string
Example string
Subcommands map[string]Command
ArgValidate func(args []string) error
}
func FindCommandByArgs ¶
type CommandLineState ¶
type CommandLineState struct {
// The map of commands
Commands map[string]Command
// The function that returns the header (program name, version, etc.)
GetHeader func() string
}
A struct that holds the state of the command line
func (*CommandLineState) Run ¶
func (s *CommandLineState) Run()
Click to show internal directories.
Click to hide internal directories.