Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCLICommand ¶
ToCLICommand converts a Command to a cli.Command
Types ¶
type BaseCommand ¶
type BaseCommand struct {
// contains filtered or unexported fields
}
BaseCommand provides a base implementation of the Command interface
func NewBaseCommand ¶
func (*BaseCommand) Flags ¶
func (b *BaseCommand) Flags() []cli.Flag
func (*BaseCommand) Name ¶
func (b *BaseCommand) Name() string
func (*BaseCommand) Usage ¶
func (b *BaseCommand) Usage() string
type Command ¶
type Command interface {
// Name returns the name of the command
Name() string
// Usage returns the usage description of the command
Usage() string
// Flags returns the flags for the command
Flags() []cli.Flag
// Action returns the action function for the command
Action() func(c *cli.Context) error
}
Command is the interface that all commands must implement
Click to show internal directories.
Click to hide internal directories.