Documentation ¶
Index ¶
- Variables
- func Choice(message string, options []string) (int, string, error)
- func ChoiceWithRetry(message string, options []string) (int, string, error)
- func Input(message string) (string, error)
- func Password(message string) (string, error)
- func YesNo(message string, defaultValue bool) (bool, error)
- func YesNoWithRetry(message string, defaultValue bool) (bool, error)
- type Term
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidInput = errors.New("invalid input")
ErrInvalidInput implies the imput entered was invalid
Functions ¶
func Choice ¶
Choice prompts the user for a choice from a list of options returning the index and the option string. In case of an invalid input, it returns ErrInvalidInput.
func ChoiceWithRetry ¶
ChoiceWithRetry prompts the user for a choice from a list of options returning the index and the option string. In case of an invalid input, it prompts again until a valid response is entered.
Types ¶
Click to show internal directories.
Click to hide internal directories.