choices

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 3 Imported by: 0

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

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) Init

func (c *Choices) Init(pairs ...interface{})

func (Choices) InputForChoice

func (c Choices) InputForChoice(v interface{}) (string, error)

func (*Choices) Set

func (c *Choices) Set(input string) error

func (*Choices) SetDefaultValue

func (c *Choices) SetDefaultValue(v interface{})

func (*Choices) SetTypeString

func (c *Choices) SetTypeString(ts string)

func (*Choices) String

func (c *Choices) String() string

func (*Choices) Type

func (c *Choices) Type() string

func (Choices) Usage

func (c Choices) Usage() string

func (Choices) Value

func (c Choices) Value() interface{}

Jump to

Keyboard shortcuts

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