Documentation ¶
Index ¶
- Variables
- type Command
- type Commands
- type Context
- func (ctx *Context) Close() error
- func (ctx *Context) Command() string
- func (ctx *Context) Do(c Commands)
- func (ctx *Context) Err() error
- func (ctx *Context) Fatalf(format string, args ...interface{})
- func (ctx *Context) Next() bool
- func (ctx *Context) Output() io.Writer
- func (ctx *Context) Printf(format string, args ...interface{})
- func (ctx *Context) ReadHistory() (int, error)
- func (ctx *Context) ReadLine(prompt string) (string, error)
- func (ctx *Context) SetHistory(f string)
- func (ctx *Context) SetOutput(w io.Writer)
- func (ctx *Context) SetPrompt(f string)
- func (ctx *Context) WriteHistory() (int, error)
- type Register
- type Usage
- type ValidateFunc
- type Validates
- func (v Validates) Append(f ValidateFunc) Validates
- func (v Validates) Choices(pos int, choices []string) Validates
- func (v Validates) Finish() ValidateFunc
- func (v Validates) MaxArgs(n int) Validates
- func (v Validates) MinArgs(n int) Validates
- func (v Validates) NumArgs(n int) Validates
- func (v Validates) NumArgsChoice(n ...int) Validates
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HistoryFile string MaxLines = 65536 Prompt = ">> " )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) ReadHistory ¶
func (*Context) SetHistory ¶
func (*Context) WriteHistory ¶
type ValidateFunc ¶
type Validates ¶
type Validates []ValidateFunc
func NewValidats ¶
func NewValidats() Validates
func (Validates) Append ¶
func (v Validates) Append(f ValidateFunc) Validates
func (Validates) Finish ¶
func (v Validates) Finish() ValidateFunc
func (Validates) NumArgsChoice ¶
Click to show internal directories.
Click to hide internal directories.