Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Name string // the name of this command Description string // usage message // contains filtered or unexported fields }
Command is a command line
func NewCommand ¶
NewCommand create new command
func (*Command) ParseAndExecute ¶
ParseAndExecute parse arguments, and run handlers. If error occurred, will exit with non-zero code.
func (*Command) ParseOsArgsAndExecute ¶
func (c *Command) ParseOsArgsAndExecute()
ParseOsArgsAndExecute parse commandline passed arguments, and run handlers.If error occurred, will exit with non-zero code.
type CompositeCommand ¶
type CompositeCommand struct { Name string // the command name Description string // the description // contains filtered or unexported fields }
CompositeCommand for commands
func NewCompositeCommand ¶
func NewCompositeCommand(Name string, description string) *CompositeCommand
NewCompositeCommand create new CompositeCommand
func (*CompositeCommand) AddSubCommands ¶
func (c *CompositeCommand) AddSubCommands(commands ...*Command)
AddSubCommands add sub commands
func (*CompositeCommand) ParseAndExecute ¶
func (c *CompositeCommand) ParseAndExecute(arguments []string)
ParseAndExecute parse arguments, and execute command
func (*CompositeCommand) ParseOsArgsAndExecute ¶
func (c *CompositeCommand) ParseOsArgsAndExecute()
ParseOsArgsAndExecute parse commandline passed arguments, and execute command
Click to show internal directories.
Click to hide internal directories.