Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateEmail ¶
Types ¶
type Prompt ¶
type Prompt struct { // InfoLines that are printed before the. InfoLines []string // The label of the prompt. Label string // The color of the label LabelColour color.Attribute // HideEntered will mask the input is true. HideEntered bool // The validation function for the input Validator ValidateFunc // Invalid represent the string to show if the input is invalid. Invalid string // The number of maximum allowed retries. If set to zero it will be automatically // assigned 999. Retries int }
Prompt represents a single line input field with options for validation and input masks.
func GetConfirmationPrompt ¶
GetConfirmationPrompt returns a Prompt that has been configured to show a y/n prompt to the user with `s` as label and `i` as info lines.
type ValidateFunc ¶
ValidateFunc is for any validation functions that validates a given input. It should return an err if the input is not valid.
Click to show internal directories.
Click to hide internal directories.