question

package
v0.49.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WithYesAsDefault bool = true
	WithNoAsDefault  bool = false
)

Variables

View Source
var (
	Required    = survey.WithValidator(survey.Required)
	Cursor      = survey.WithShowCursor(true)
	Subquestion = survey.WithIcons(func(icons *survey.IconSet) {
		icons.Question.Text = "|"
		icons.Question.Format = "green+d"
	})
)

Functions

func WithBoolAnswer

func WithBoolAnswer(question string, opts []survey.AskOpt, yesno ...BoolAnswer) bool

func WithDurationAnswer

func WithDurationAnswer(question string, opts []survey.AskOpt) core.Duration

func WithFloat64Answer

func WithFloat64Answer(question string, opts []survey.AskOpt, min, max float64) float64

func WithInt64Answer

func WithInt64Answer(question string, opts []survey.AskOpt) int64

func WithSingleChoiceAnswer

func WithSingleChoiceAnswer(question string, opts []survey.AskOpt, choices ...string) string

func WithStringAnswer

func WithStringAnswer(questionText string, opts []survey.AskOpt) string

func WithStringAnswerV2 added in v0.13.0

func WithStringAnswerV2(questionText string, helpText string, defaultAnswser string, opts []survey.AskOpt) string

func WithStringOptionalAnswer added in v0.42.1

func WithStringOptionalAnswer(questionText string, helpText string, defaultAnswser string, opts []survey.AskOpt) string

Types

type AskOpt added in v0.12.0

type AskOpt = survey.AskOpt

type BoolAnswer added in v0.11.0

type BoolAnswer = bool

Jump to

Keyboard shortcuts

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