Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCommandFlagSet ¶
MakeCommandFlagSet creates flag set for given command.
Types ¶
type Command ¶
type Command struct { // Name is command name and command line identifier. Name string // Desc is a description of the command. Desc string // Parser gets rest of command line arguments and returns a function which // executes the command. Parser func(args []string) (CommandFunc, error) }
Command defines CLI command.
type CommandFunc ¶
CommandFunc is a prototype of a function which executes command.
func Parse ¶
func Parse(cmds ...*Command) CommandFunc
Parse dispatches and run parser for a command from given set.
Click to show internal directories.
Click to hide internal directories.