Documentation ¶
Index ¶
- Variables
- type Ask
- func (a *Ask) Bool(question, defaultAnswer string) (bool, error)
- func (a *Ask) Choice(question string, choices []string, defaultAnswer string) (string, error)
- func (a *Ask) Int(question string, min, max int64, defaultAnswer string) (int64, error)
- func (a *Ask) Password(question string) (string, error)
- func (a *Ask) PasswordOnce(question string) string
- func (a *Ask) String(question, defaultAnswer string, validate func(string) error) (string, error)
- func (a *Ask) Text(question string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxRetriesInput = errors.New("invalid number input tried")
ErrMaxRetriesInput represents when an input is invalid after numerous attempts
Functions ¶
This section is empty.
Types ¶
type Ask ¶
type Ask struct {
// contains filtered or unexported fields
}
Ask represents a way of asking questions and getting answers from the output and input terminal retrospectively.
func (*Ask) PasswordOnce ¶
PasswordOnce asks the user to enter a password.
Click to show internal directories.
Click to hide internal directories.