Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Name string Description string Commands []*Command DynamicCommands func() []*Command Options []*Option DynamicParam *DynamicParam Run func(cmd *ExecCmd) }
func (*Command) AddCommand ¶
type DynamicParam ¶
type DynamicParam struct { // input 当前最后输入的字符串用于支持模糊查询 // return map[string]string key为值,value为描述 Func func(input string) []*Param Flag string Description string }
func (*DynamicParam) Check ¶
func (dc *DynamicParam) Check() error
type ExecCmd ¶
type ExecCmd struct { Name string Child *ExecCmd Parent *ExecCmd Param string Options map[string]string // 包含flag Command *Command Input string }
func ParseExecCommand ¶
Click to show internal directories.
Click to hide internal directories.