survey

package
v0.0.0-...-26d83ff Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 24

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
	DefaultValueSet        bool
	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