terminal

package
v0.11.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package terminal 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 ShortenFilePath

func ShortenFilePath(fullPath string) string

ShortenFilePath take a full file path and attempts to shorten it by replacing the current directory to './'.

Types

type ByID

type ByID []*api.Breakpoint

ByID sorts breakpoints by ID.

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
}

Commands represents the commands for Delve terminal process.

func DebugCommands

func DebugCommands(client service.Client) *Commands

DebugCommands 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{}

ExitRequestError is returned when the user exits Delve.

func (ExitRequestError) Error

func (ere ExitRequestError) Error() string

type Term

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

Term represents the terminal running dlv.

func New

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

New returns a new Term.

func (*Term) Println

func (t *Term) Println(prefix, str string)

Println prints a line to the terminal.

func (*Term) Run

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

Run begins running dlv in the terminal.

Jump to

Keyboard shortcuts

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