Versions in this module Expand all Collapse all v0 v0.3.16 Nov 22, 2019 Changes in this version + func Bold(s string) string + func Italic(s string) string + func Open(url string) *exec.Cmd + func Prompt(label string, value string, edit bool, validator Validator) (string, error) + func PromptBoolean(m string, defaultValue bool) (bool, error) + func PromptChoices(m string, value string, choices []string) (int, error) + func PromptMultipleChoices(m string, choices []string) ([]int, error) + func PromptSecret(m string) (string, error) + func PromptWithHelp(label string, value string, edit bool, validator Validator, help string) (string, error) + func PromptYN(m string) (bool, error) + func ResetPromptLib() + func SetOutput(out io.Writer) + func SetPromptLib(p PromptLib) + func Underline(s string) string + func Wrap(lim uint, args ...interface{}) string + func WrapSprintf(lim uint, format string, a ...interface{}) string + func WrapString(lim uint, s string) string + type Logger func(args ...interface{}) + var LogFn Logger + type PromptLib interface + Prompt func(label string, value string, edit bool, validator Validator) (string, error) + PromptChoices func(m string, value string, choices []string) (int, error) + PromptMultipleChoices func(m string, choices []string) ([]int, error) + PromptSecret func(m string) (string, error) + PromptWithHelp func(label string, value string, edit bool, validator Validator, help string) (string, error) + PromptYN func(m string, defaultValue bool) (bool, error) + func NewTestPrompts(inputs []interface{}) PromptLib + type SurveyUI struct + func (sui *SurveyUI) Prompt(label string, value string, edit bool, validator Validator) (string, error) + func (sui *SurveyUI) PromptChoices(m string, value string, choices []string) (int, error) + func (sui *SurveyUI) PromptMultipleChoices(m string, choices []string) ([]int, error) + func (sui *SurveyUI) PromptSecret(m string) (string, error) + func (sui *SurveyUI) PromptWithHelp(label string, value string, edit bool, validator Validator, help string) (string, error) + func (sui *SurveyUI) PromptYN(m string, defaultValue bool) (bool, error) + type TestPrompts struct + func (t *TestPrompts) Prompt(label string, value string, edit bool, validator Validator) (string, error) + func (t *TestPrompts) PromptChoices(m string, value string, choices []string) (int, error) + func (t *TestPrompts) PromptMultipleChoices(m string, choices []string) ([]int, error) + func (t *TestPrompts) PromptSecret(m string) (string, error) + func (t *TestPrompts) PromptWithHelp(label string, value string, edit bool, validator Validator, help string) (string, error) + func (t *TestPrompts) PromptYN(m string, defaultValue bool) (bool, error) + type Validator func(string) error + func EmailValidator() Validator + func LengthValidator(min int) Validator + func PathOrURLValidator() Validator + func URLValidator(protocol ...string) Validator