terminal

package
v0.9.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package command implements functions for responding to user input and dispatching to appropriate backend commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandFunc

func CommandFunc(fn func() error) cmdfunc

Types

type ById

type ById []*api.Breakpoint

func (ById) Len

func (a ById) Len() int

func (ById) Less

func (a ById) Less(i, j int) bool

func (ById) Swap

func (a ById) Swap(i, j int)

type Commands

type Commands struct {
	// contains filtered or unexported fields
}

func DebugCommands

func DebugCommands(client service.Client) *Commands

Returns a Commands struct with default commands defined.

func (*Commands) Find

func (c *Commands) Find(cmdstr string) cmdfunc

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

func (c *Commands) Merge(allAliases map[string][]string)

Merge takes aliases defined in the config struct and merges them with the default aliases.

func (*Commands) Register

func (c *Commands) Register(cmdstr string, cf cmdfunc, helpMsg string)

Register custom commands. Expects cf to be a func of type cmdfunc, returning only an error.

type ExitRequestError

type ExitRequestError struct{}

func (ExitRequestError) Error

func (ere ExitRequestError) Error() string

type Term

type Term struct {
	// contains filtered or unexported fields
}

func New

func New(client service.Client, conf *config.Config) *Term

func (*Term) Run

func (t *Term) Run() (error, int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL