Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidType will be returned when a type that doesn't implement the correct interfaces is passed to a bidning function ErrInvalidType = errors.New("invlaid type") // ErrNotACommand will be returned when a binding target doesn't implement one of the command interfaces. ErrNotACommand = errors.New("not a command") )
Functions ¶
Types ¶
type CobraCommand ¶ added in v0.2.0
CobraCommand is the a comand that implements the cobra.Command.Run interface. This is useful when you need lower level access to things like global options or the raw cli args.
type Command ¶
type Command interface {
Run([]string)
}
Command is a runnable command that doesn't have sub commands
type Defaulter ¶
type Defaulter interface {
Default()
}
Defaulter can set up the default arguments of a command
type Group ¶
type Group interface {
SubCommands() Map
}
Group is a set of subcommands or sub groups.
type Helper ¶
type Helper interface {
Help() string
}
Helper returns usage information for a command or group.
type ShortHelper ¶ added in v0.2.0
type ShortHelper interface {
ShortHelp() string
}
ShortHelper implements a less verbose help.
type SimpleCommand ¶ added in v0.2.0
type SimpleCommand interface {
Run()
}
SimpleCommand is a command that doesn't care about the raw args
Click to show internal directories.
Click to hide internal directories.