Documentation ¶
Index ¶
- func Render(commands map[string]*Command)
- type Command
- type CommandGroup
- type Console
- type ParsedCommand
- func (p *ParsedCommand) GetArgument(name string) *Value
- func (p *ParsedCommand) GetArgumentWithDefault(name string, defaultValue any) *Value
- func (p *ParsedCommand) GetName() string
- func (p *ParsedCommand) GetOption(name string) *Value
- func (p *ParsedCommand) GetOptionWithDefault(name string, defaultValue any) *Value
- func (p *ParsedCommand) GetPrefix() string
- func (p *ParsedCommand) GetSubCommand() string
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct { Definition string Description string Execution func(c *ParsedCommand) }
func (*Command) GetCommand ¶
func (*Command) GetDescription ¶
func (*Command) Run ¶
func (cmd *Command) Run(c *ParsedCommand)
type CommandGroup ¶
type Console ¶
func (*Console) AddCommand ¶
func (c *Console) AddCommand(name string, description string, execution func(c *ParsedCommand)) *Command
type ParsedCommand ¶
type ParsedCommand struct {
// contains filtered or unexported fields
}
func Parse ¶
func Parse(definition string, command string) *ParsedCommand
func (*ParsedCommand) GetArgument ¶
func (p *ParsedCommand) GetArgument(name string) *Value
func (*ParsedCommand) GetArgumentWithDefault ¶
func (p *ParsedCommand) GetArgumentWithDefault(name string, defaultValue any) *Value
func (*ParsedCommand) GetName ¶
func (p *ParsedCommand) GetName() string
func (*ParsedCommand) GetOption ¶
func (p *ParsedCommand) GetOption(name string) *Value
func (*ParsedCommand) GetOptionWithDefault ¶
func (p *ParsedCommand) GetOptionWithDefault(name string, defaultValue any) *Value
func (*ParsedCommand) GetPrefix ¶
func (p *ParsedCommand) GetPrefix() string
func (*ParsedCommand) GetSubCommand ¶
func (p *ParsedCommand) GetSubCommand() string
Directories ¶
Path | Synopsis |
---|---|
Package filenotify provides a mechanism for watching file(s) for changes.
|
Package filenotify provides a mechanism for watching file(s) for changes. |
Click to show internal directories.
Click to hide internal directories.