Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCommands = []*Command{ { Name: "open", Args: []string{"<buffer>"}, Heading: DefaultGroup, Description: "Open and change buffers to a given service", }, { Name: "close", Args: []string{"<buffer>"}, Heading: DefaultGroup, Description: "Close a buffer and return to the last opened previously", }, { Name: "buffer", Args: []string{"<buffer>"}, Heading: DefaultGroup, Description: "Change to the named buffer", }, { Name: "link", Args: []string{"<current>", "<buffer>"}, Heading: DefaultGroup, Description: "Overwrite the current buffer with the named", }, { Name: "quit", Args: []string{}, Heading: DefaultGroup, Description: "Exits the client", }, }
TODO(halfiwt) i18n
Functions ¶
This section is empty.
Types ¶
type ComGroup ¶
type ComGroup int
ComGroup is a logical grouping of commands To add a ComGroup, please do so in a PR
type Command ¶
type Command struct {
Name string
Description string
Heading ComGroup
Args []string
Alias []string
From string
}
Command represents an available command to a service The From field should generally be populated, except in the case of a ServiceGroup command
type Commander ¶
type Commander interface {
CtrlData() func() []byte
// Exec will issue the given Command, and return any errors encountered
Exec(*Command) error
FindCommands(b []byte) ([]*Command, error)
FromString(string) (*Command, error)
FromBytes([]byte) (*Command, error)
FindCommand(string, []*Command) (*Command, error)
WriteCommands([]*Command, io.Writer) error
}
Click to show internal directories.
Click to hide internal directories.