prompter

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliPrompter

type CliPrompter struct {
}

CliPrompter used to prompt for cli input

func (*CliPrompter) Choice

func (cli *CliPrompter) Choice(pr string, options []string) string

Choice given the choice return the option selected

func (*CliPrompter) RequestSecurityCode

func (cli *CliPrompter) RequestSecurityCode(pattern string) string

RequestSecurityCode request a security code to be entered by the user

func (*CliPrompter) StringRequired

func (cli *CliPrompter) StringRequired(pr string) string

StringRequired prompt for string which is required

type Prompter

type Prompter interface {
	RequestSecurityCode(pattern string) string
	Choice(prompt string, options []string) string
	StringRequired(pr string) string
}

Prompter handles prompting user for input

func NewCli

func NewCli() Prompter

NewCli builds a new cli prompter

Jump to

Keyboard shortcuts

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