Documentation ¶
Overview ¶
Package prompter is utility for easy prompting
Index ¶
- Constants
- func Choose(message string, choices []string, defaultChoice string) string
- func Password(message string) string
- func Prompt(message, defaultAnswer string) string
- func Regexp(message string, reg *regexp.Regexp, defaultAnswer string) string
- func YN(message string, yes bool) bool
- func YesNo(message string, yes bool) bool
- type Prompter
Constants ¶
View Source
const VERSION = "0.3.0"
VERSION version of prompter
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Prompter ¶
type Prompter struct { Message string // choices of answer Choices []string IgnoreCase bool Default string // specify answer pattern by regexp. When both Choices and Regexp are specified, Regexp takes a priority. Regexp *regexp.Regexp // for passwords and so on. NoEcho bool UseDefault bool // contains filtered or unexported fields }
Prompter is object for prompting
Click to show internal directories.
Click to hide internal directories.