Documentation ¶
Overview ¶
Package terminal implements functions for responding to user input and dispatching to appropriate backend commands.
Index ¶
- Variables
- func DisasmPrint(dv api.AsmInstructions, out io.Writer)
- func ShortenFilePath(fullPath string) string
- type ByFirstAlias
- type ByID
- type Commands
- func (c *Commands) Call(cmdstr string, t *Term) error
- func (c *Commands) CallWithContext(cmdstr string, t *Term, ctx callContext) error
- func (c *Commands) Find(cmdstr string, prefix cmdPrefix) cmdfunc
- func (c *Commands) Merge(allAliases map[string][]string)
- func (c *Commands) Register(cmdstr string, cf cmdfunc, helpMsg string)
- func (commands *Commands) WriteMarkdown(w io.Writer)
- type ExitRequestError
- type Term
Constants ¶
This section is empty.
Variables ¶
var ( // LongLoadConfig loads more information: // * Follows pointers // * Loads more array values // * Does not limit struct fields LongLoadConfig = api.LoadConfig{true, 1, 64, 64, -1} // ShortLoadConfig loads less information, not following pointers // and limiting struct fields loaded to 3. ShortLoadConfig = api.LoadConfig{false, 0, 64, 0, 3} )
Functions ¶
func DisasmPrint ¶
func DisasmPrint(dv api.AsmInstructions, out io.Writer)
func ShortenFilePath ¶
ShortenFilePath take a full file path and attempts to shorten it by replacing the current directory to './'.
Types ¶
type ByFirstAlias ¶
type ByFirstAlias []command
ByFirstAlias will sort by the first alias of a command.
func (ByFirstAlias) Len ¶
func (a ByFirstAlias) Len() int
func (ByFirstAlias) Less ¶
func (a ByFirstAlias) Less(i, j int) bool
func (ByFirstAlias) Swap ¶
func (a ByFirstAlias) Swap(i, j int)
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
Commands represents the commands for Delve terminal process.
func DebugCommands ¶
DebugCommands returns a Commands struct with default commands defined.
func (*Commands) CallWithContext ¶
CallWithContext takes a command and a context that command should be executed in.
func (*Commands) Find ¶
Find will look up the command function for the given command input. If it cannot find the command it will default to noCmdAvailable(). If the command is an empty string it will replay the last command.
func (*Commands) Merge ¶
Merge takes aliases defined in the config struct and merges them with the default aliases.
func (*Commands) Register ¶
Register custom commands. Expects cf to be a func of type cmdfunc, returning only an error.
func (*Commands) WriteMarkdown ¶
type ExitRequestError ¶
type ExitRequestError struct{}
ExitRequestError is returned when the user exits Delve.
func (ExitRequestError) Error ¶
func (ere ExitRequestError) Error() string