command

package
v0.0.0-...-835ebca Latest Latest
Warning

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

Go to latest
Published: May 8, 2015 License: MIT Imports: 9 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 []*proctl.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() *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 defualt to noCmdAvailable(). If the command is an empty string it will replay the last command.

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.

Jump to

Keyboard shortcuts

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