survey

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NameRegex string = "^[a-zA-Z0-9].[-.a-zA-Z0-9]*$"

NameRegex should be used to verify all names

Functions

func CheckName

func CheckName(name string) (match bool, err error)

CheckName verifies the name against utils.NameRegex

func Confirm

func Confirm(message string, preselected bool) (confirm bool)

Confirm abstracts survey's confirm and adds styling

func Input

func Input(message string, suggestion string) (response string)

Input abstracts survey's input and adds styling

func InputName

func InputName(message string, suggestion string) (response string)

InputName abstracts survey's input and validates input

func MultiSelect

func MultiSelect(message string, options []string, preselected []string) (selection []string)

MultiSelect abstracts survey's multiselect and adds styling

func Select

func Select(message string, options []string) (selection string)

Select abstracts survey's select and adds styling

func ValidateName

func ValidateName(val interface{}) error

ValidateName implements the validate func type

Types

This section is empty.

Jump to

Keyboard shortcuts

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