Documentation
¶
Overview ¶
Teonet CLI application menu.
Index ¶
- type Batch
- type CmdHelp
- type Compliter
- type Item
- type Menu
- func (m *Menu) Add(items ...Item)
- func (m Menu) ExecuteCommand(line string) (err error)
- func (m Menu) MakeCommand(command string, help string, exec func(line string) error, ...) Item
- func (m *Menu) MakeCompliterFromString(strings []string) (cmpl []Compliter)
- func (m *Menu) Run() (err error)
- func (m Menu) Split(line, delimiter string) (res []string)
- func (m Menu) SplitComma(line string) (res []string)
- func (m Menu) SplitSpace(line string) (res []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Batch is data and methods to Save and Execute saved Teonet Menu commands.
type CmdHelp ¶
type CmdHelp struct {
// contains filtered or unexported fields
}
CmdHelp help command
type Compliter ¶
type Compliter readline.PrefixCompleterInterface // Readline compliter type
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
Menu is Teonet CLI application menu
func (Menu) ExecuteCommand ¶
ExecuteCommand executes command using input command line
func (Menu) MakeCommand ¶
func (m Menu) MakeCommand(command string, help string, exec func(line string) error, comp ...func() []Compliter) Item
MakeCommand create command object for Add command. The first argument 'command' may by static string or dynamic function which return Items name
func (*Menu) MakeCompliterFromString ¶
MakeCompliterFromString returns compliter created from input string slice
func (Menu) SplitComma ¶
SplitComma split line by comma helper function
func (Menu) SplitSpace ¶
SplitSpace split line by space helper function
Click to show internal directories.
Click to hide internal directories.