Documentation
¶
Overview ¶
Package promptui provides ui elements for the command line prompt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prompt ¶
type Prompt struct {
Label string // Label is the value displayed on the command line prompt
// Validate is optional. If set, this function is used to validate the input
// after each character entry.
Validate ValidateFunc
// If mask is set, this value is displayed instead of the actual input
// characters.
Mask rune
// contains filtered or unexported fields
}
Prompt represents a single line text field input.
type ValidateFunc ¶
ValidateFunc validates the given input. It should return a ValidationError if the input is not valid.
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError is the class of errors resulting from invalid inputs, returned from a ValidateFunc.
func NewValidationError ¶
func NewValidationError(msg string) *ValidationError
NewValidationError creates a new validation error with the given message.
func (*ValidationError) Error ¶
func (v *ValidationError) Error() string
Error implements the error interface for ValidationError.
Click to show internal directories.
Click to hide internal directories.