Documentation ¶
Index ¶
- type Prompt
- type Survey
- func (s *Survey) Confirm(prompt string, defaulted bool, surveyOptions ...survey.AskOpt) (bool, error)
- func (s *Survey) Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error)
- func (s *Survey) Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prompt ¶
type Prompt interface { // Select surveys the user for an answer // returns the int corresponding to the slice's selected element Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error) // Input will ask the user for a free-form input // with a default option Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error) // Confirm will confirm with the user with a defaulted option Confirm(prompt string, defaulted bool, surveryOptions ...survey.AskOpt) (bool, error) }
Click to show internal directories.
Click to hide internal directories.