Documentation ¶
Overview ¶
Package decorative implement decorative prompts using the survey library.
Index ¶
- type Decorative
- func (d Decorative) Confirm(msg string, defvalue bool) bool
- func (d Decorative) Input(msg string, defvalue string, required bool) string
- func (d Decorative) Password(msg string) string
- func (d Decorative) PressEnter(msg string)
- func (d Decorative) Select(msg string, options []string, defvalue string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decorative ¶
type Decorative struct{}
Decorative is a decorative prompt.
func (Decorative) Confirm ¶
func (d Decorative) Confirm(msg string, defvalue bool) bool
Confirm asks for user for a "Yes" or "No" response. The default value is used if the user presses enter without typing anything.
func (Decorative) Input ¶
func (d Decorative) Input(msg string, defvalue string, required bool) string
Input asks the user for a string. If required is true then the string cannot be empty.
func (Decorative) Password ¶
func (d Decorative) Password(msg string) string
Password asks the user for a password. Password can't be empty.
func (Decorative) PressEnter ¶
func (d Decorative) PressEnter(msg string)
PressEnter asks the user to press enter to continue.
Click to show internal directories.
Click to hide internal directories.