Documentation ¶
Index ¶
- type SimPrompt
- func (sp *SimPrompt) AppendCmd(cmd []string, help string, cb func([]string) bool) error
- func (sp *SimPrompt) GetHelp(cmd string) string
- func (sp *SimPrompt) GetHelpAll() (ret []string)
- func (sp *SimPrompt) Run(scan *os.File) chan bool
- func (sp *SimPrompt) SetCmds(cmds map[string]SimPromptCmd)
- func (sp *SimPrompt) SetDefaultCallback(cb func([]string) bool)
- func (sp *SimPrompt) SetHelp(cmd, help string) error
- func (sp *SimPrompt) SetPrompt(s string)
- type SimPromptCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimPrompt ¶
type SimPrompt struct { Prompt string Cmds map[string]SimPromptCmd DefaultCallback func([]string) bool CmdNum int }
func NewSimPrompt ¶
func NewSimPrompt() *SimPrompt
func (*SimPrompt) GetHelpAll ¶
func (*SimPrompt) SetCmds ¶
func (sp *SimPrompt) SetCmds(cmds map[string]SimPromptCmd)
func (*SimPrompt) SetDefaultCallback ¶
Click to show internal directories.
Click to hide internal directories.