Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateCommand = errors.New("Duplicate command")
ErrDuplicateCommand is returned when two commands have the same name
Functions ¶
Types ¶
type Base ¶
type Base struct {
Name, Help string
Action func(input io.Reader, output io.Writer, args ...string) (exit bool)
}
Base is a basic Command that runs a closure
type Command ¶
type Command interface { Startup(w io.Writer) error Shutdown(w io.Writer) error GetName() string GetHelp() string Run(input io.Reader, output io.Writer, args ...string) (exit bool) }
Command represents a terminal command
func GetCommand ¶
GetCommand returns the command with the given name
Click to show internal directories.
Click to hide internal directories.