Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandRegex = regexp.MustCompile(`(?m)("[^"]+"|[^\s"]+)`)
Functions ¶
This section is empty.
Types ¶
type CommandInfo ¶
type Map ¶
func (Map) Get ¶
Get returns the given command registered to this map by its name. ex `m.Get("help")`
func (Map) Register ¶
Register adds the given Command to by name to the Map with a option to override if the said command already exists.
func (Map) Unregister ¶
Unregister removes the given command by its name from the command map.
type Processor ¶
type Processor struct { Map Map On func(cmd Command) Logger logger.Logger // contains filtered or unexported fields }
func (Processor) RegisterDefaults ¶
func (p Processor) RegisterDefaults()
func (Processor) StartProcessing ¶
StartProcessing starts the command processor reading from the given std in (*io.File in golang terms.)
func (Processor) StopProcessing ¶
func (p Processor) StopProcessing()
StopProcessing stops the command processor from occupying the stdin and will stop all future command execution.
Click to show internal directories.
Click to hide internal directories.