Documentation ¶
Index ¶
- func Choose(pr string, options []string) int
- func ChooseWithDefault(pr string, defaultValue string, options []string) (string, error)
- func Password(pr string) string
- func RequestSecurityCode(pattern string) string
- func SetPrompter(prmpt Prompter)
- func String(pr string, defaultValue string) string
- func StringRequired(pr string) string
- type CliPrompter
- func (cli *CliPrompter) Choose(pr string, options []string) int
- func (cli *CliPrompter) ChooseWithDefault(pr string, defaultValue string, options []string) (string, error)
- func (cli *CliPrompter) Password(pr string) string
- func (cli *CliPrompter) RequestSecurityCode(pattern string) string
- func (cli *CliPrompter) String(pr string, defaultValue string) string
- func (cli *CliPrompter) StringRequired(pr string) string
- type Prompter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseWithDefault ¶
ChooseWithDefault given the choice return the option selected with a default
func RequestSecurityCode ¶
RequestSecurityCode request a security code to be entered by the user
func SetPrompter ¶
func SetPrompter(prmpt Prompter)
SetPrompter configure an aternate prompter to the default one
func StringRequired ¶
StringRequired prompt for string which is required
Types ¶
type CliPrompter ¶
type CliPrompter struct { }
CliPrompter used to prompt for cli input
func (*CliPrompter) Choose ¶
func (cli *CliPrompter) Choose(pr string, options []string) int
Choose given the choice return the option selected
func (*CliPrompter) ChooseWithDefault ¶
func (cli *CliPrompter) ChooseWithDefault(pr string, defaultValue string, options []string) (string, error)
ChooseWithDefault given the choice return the option selected with a default
func (*CliPrompter) Password ¶
func (cli *CliPrompter) Password(pr string) string
Password prompt for password which is required
func (*CliPrompter) RequestSecurityCode ¶
func (cli *CliPrompter) RequestSecurityCode(pattern string) string
RequestSecurityCode request a security code to be entered by the user
func (*CliPrompter) String ¶
func (cli *CliPrompter) String(pr string, defaultValue string) string
StringRequired prompt for string which is required
func (*CliPrompter) StringRequired ¶
func (cli *CliPrompter) StringRequired(pr string) string
StringRequired prompt for string which is required
Click to show internal directories.
Click to hide internal directories.