Documentation ¶
Index ¶
- type CommandContext
- func (c *CommandContext) CurrentCommand() string
- func (c *CommandContext) Invoke(commands map[string]CommandEntryFunc) error
- func (c *CommandContext) NextContext(name string, args []string) *CommandContext
- func (c *CommandContext) Parse(set *flag.FlagSet) error
- func (c *CommandContext) SetDefaultCommand(name string)
- type CommandEntryFunc
- type Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandContext ¶
type CommandContext struct { Command string Args []string // contains filtered or unexported fields }
func NewCommandContext ¶
func NewCommandContext(args []string) *CommandContext
func (*CommandContext) CurrentCommand ¶
func (c *CommandContext) CurrentCommand() string
func (*CommandContext) Invoke ¶
func (c *CommandContext) Invoke(commands map[string]CommandEntryFunc) error
func (*CommandContext) NextContext ¶
func (c *CommandContext) NextContext(name string, args []string) *CommandContext
func (*CommandContext) SetDefaultCommand ¶
func (c *CommandContext) SetDefaultCommand(name string)
type CommandEntryFunc ¶
type CommandEntryFunc func(*CommandContext) error
Click to show internal directories.
Click to hide internal directories.