question

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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