Documentation
¶
Index ¶
- type Context
- func (c *Context) Exit()
- func (c *Context) GetCurrentMode() (mode_interface.Mode, error)
- func (c *Context) ModeSuggestionsFunc(line []string) []prompt.Suggest
- func (c *Context) RegisterMode(m mode_interface.Mode, desc string)
- func (c *Context) SelectMode(modeName string) (mode_interface.Mode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
A context is used by the console for state and initialization TODO : finish scratchpad implementation
func (*Context) Exit ¶
func (c *Context) Exit()
When the active mode is set to nil, the cli will exit
func (*Context) GetCurrentMode ¶
func (c *Context) GetCurrentMode() (mode_interface.Mode, error)
Returns the current active mode
func (*Context) ModeSuggestionsFunc ¶
Returns a slice of Prompt.Suggest objects containing suggestions for the currently registered modes
func (*Context) RegisterMode ¶
func (c *Context) RegisterMode(m mode_interface.Mode, desc string)
Register a mode that will be usable within the context
func (*Context) SelectMode ¶
func (c *Context) SelectMode(modeName string) (mode_interface.Mode, error)
Select the active mode, based on the mode name
Click to show internal directories.
Click to hide internal directories.