Documentation ¶
Overview ¶
Package prompt provides functionality for filling struct from user input which the user is asked for on the command line.
Index ¶
Constants ¶
View Source
const ( TagValueSkip = "-" TagValueRequired = "required" TagValueValidate = "validate" TagValueName = "name" TagValueMask = "mask" )
Available struct tag values for "prompt".
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prompter ¶
type Prompter struct {
// contains filtered or unexported fields
}
A Prompter prompts the user for input.
func NewWithValidators ¶
func NewWithValidators(validators map[string]ValidatorFunc) *Prompter
NewWithValidators creates a new Prompter with the given validator functions.
type ValidatorFunc ¶
type ValidatorFunc = promptui.ValidateFunc
ValidatorFunc validates prompt input.
Click to show internal directories.
Click to hide internal directories.