survey

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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)
}

type Survey

type Survey struct{}

func (*Survey) Confirm

func (s *Survey) Confirm(prompt string, defaulted bool, surveyOptions ...survey.AskOpt) (bool, error)

func (*Survey) Input

func (s *Survey) Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error)

func (*Survey) Select

func (s *Survey) Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL