Documentation ¶
Overview ¶
Package cli provides all methods to control command line functions
Index ¶
- Variables
- func Flag(args string) (string, map[string]interface{})
- func SetFlag(flag map[string]interface{}, option string, v interface{}) interface{}
- type Readline
- func (r *Readline) AddCompleter(pcItem string, pcSubItems []string)
- func (r *Readline) Close(next chan struct{})
- func (r *Readline) GetPrompt() string
- func (r *Readline) Help()
- func (r *Readline) Next()
- func (r *Readline) Refresh()
- func (r *Readline) RemoveItemCompleter(pcItem string)
- func (r *Readline) Run(cmd chan<- string, next chan struct{})
- func (r *Readline) SetEmacs()
- func (r *Readline) SetPrompt(p string)
- func (r *Readline) SetVim()
- func (r *Readline) UpdateCompleter(pcItem string, pcSubItems []string)
- func (r *Readline) UpdatePromptN(p string, n int)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// validation command regex
CMDReg, _ = regexp.Compile(
`(ping|trace|bgp|lg|ns|dig|dump|disc|whois|peering|scan|hping|connect|node|local|mode|help|web|exit|quit)\s{0,1}(.*)`)
)
Functions ¶
Types ¶
type Readline ¶
type Readline struct {
// contains filtered or unexported fields
}
Readline structure
func (*Readline) AddCompleter ¶
AddCompleter updates subitem(s) from a specific main item
func (*Readline) RemoveItemCompleter ¶
RemoveItemCompleter removes subitem(s) from a specific main item
func (*Readline) UpdateCompleter ¶
UpdateCompleter updates subitem(s) from a specific main item
func (*Readline) UpdatePromptN ¶
UpdatePromptN appends readline prompt
Click to show internal directories.
Click to hide internal directories.