prompter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Stdin  terminal.FileReader
	Stdout terminal.FileWriter
	Stderr io.Writer
}

func NewCLIPrompter

func NewCLIPrompter(in terminal.FileReader, out terminal.FileWriter, err io.Writer) *CLI

func (*CLI) Confirm

func (p *CLI) Confirm(message, help string) (val bool, err error)

func (*CLI) Get

func (p *CLI) Get(message, help string, validate func(val string) error) (val string, err error)

func (*CLI) SelectMultiple

func (p *CLI) SelectMultiple(message, help string, options []string) ([]string, error)

func (*CLI) SelectOne

func (p *CLI) SelectOne(message, help string, options []string) (val string, err error)

Jump to

Keyboard shortcuts

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