Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCommand ¶
func RegisterCommand(name CommandName, command Command, opts *CommandOpts) error
RegisterCommand registers a command
Types ¶
type Command ¶
type Command interface {
Name() CommandName
Aliases() []string
Usage() string
Subcommands() []*cli.Command
Flags() []cli.Flag
Action(c *cli.Context) error
}
Command is the interface that all commands must implement
type CommandOpts ¶
type CommandOpts struct {
// Treat all flags as normal arguments if true
SkipFlagParsing bool
}
CommandOpts is the options for a command
Click to show internal directories.
Click to hide internal directories.