Documentation ¶
Index ¶
- Constants
- Variables
- func WithBoolAnswer(question string, opts []survey.AskOpt, yesno ...BoolAnswer) bool
- func WithDurationAnswer(question string, opts []survey.AskOpt) core.Duration
- func WithFloat64Answer(question string, opts []survey.AskOpt, min, max float64) float64
- func WithInt64Answer(question string, opts []survey.AskOpt) int64
- func WithSingleChoiceAnswer(question string, opts []survey.AskOpt, choices ...string) string
- func WithStringAnswer(questionText string, opts []survey.AskOpt) string
- func WithStringAnswerV2(questionText string, helpText string, defaultAnswser string, ...) string
- func WithStringOptionalAnswer(questionText string, helpText string, defaultAnswser string, ...) string
- type AskOpt
- type BoolAnswer
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 WithFloat64Answer ¶
func WithInt64Answer ¶
func WithSingleChoiceAnswer ¶
func WithStringAnswer ¶
func WithStringAnswerV2 ¶ added in v0.13.0
Types ¶
type BoolAnswer ¶ added in v0.11.0
type BoolAnswer = bool
Click to show internal directories.
Click to hide internal directories.