survey

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultValidationRegexPattern = regexp.MustCompile("^.*$")

DefaultValidationRegexPattern is the default regex pattern to validate the input

Functions

This section is empty.

Types

type QuestionOptions

type QuestionOptions struct {
	Question               string
	DefaultValue           string
	ValidationRegexPattern string
	ValidationMessage      string
	ValidationFunc         func(value string) error
	Options                []string
	Sort                   bool
	IsPassword             bool
}

QuestionOptions defines a question and its options

type Survey

type Survey interface {
	Question(params *QuestionOptions) (string, error)
}

Survey is the interface for asking questions

func NewSurvey

func NewSurvey() Survey

NewSurvey creates a new survey object

Jump to

Keyboard shortcuts

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