Documentation ¶
Overview ¶
Package choice implements a flag.Value type that accepts a set of choices.
See test cases or grep the code base for usage hints.
Index ¶
- type Choices
- func (c *Choices) Init(pairs ...interface{})
- func (c Choices) InputForChoice(v interface{}) (string, error)
- func (c *Choices) Set(input string) error
- func (c *Choices) SetDefaultValue(v interface{})
- func (c *Choices) SetTypeString(ts string)
- func (c *Choices) String() string
- func (c *Choices) Type() string
- func (c Choices) Usage() string
- func (c Choices) Value() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choices ¶
type Choices struct {
// contains filtered or unexported fields
}
func (Choices) InputForChoice ¶
func (*Choices) SetDefaultValue ¶
func (c *Choices) SetDefaultValue(v interface{})
func (*Choices) SetTypeString ¶
Click to show internal directories.
Click to hide internal directories.