terminal

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChoicesPrompt

func ChoicesPrompt(message string, choices ...string) choicesPrompt

Types

type FakeUI

type FakeUI struct {
	Prompts         []string
	PasswordPrompts []string
	ChoicesPrompts  []choicesPrompt
	WarnOutputs     []string
	// contains filtered or unexported fields
}

func NewFakeUI

func NewFakeUI() *FakeUI

func (*FakeUI) Ask

func (ui *FakeUI) Ask(template string, args ...interface{}) (string, error)

func (*FakeUI) AskForPassword

func (ui *FakeUI) AskForPassword(template string, args ...interface{}) (string, error)

func (*FakeUI) ChoicesPrompt

func (ui *FakeUI) ChoicesPrompt(message string, choices []string, options *term.PromptOptions) *term.Prompt

func (*FakeUI) Confirm

func (ui *FakeUI) Confirm(template string, args ...interface{}) (bool, error)

func (*FakeUI) ConfirmWithDefault

func (ui *FakeUI) ConfirmWithDefault(defaultBool bool, template string, args ...interface{}) (bool, error)

func (*FakeUI) Failed

func (ui *FakeUI) Failed(template string, args ...interface{})

func (*FakeUI) Inputs

func (ui *FakeUI) Inputs(lines ...string)

func (*FakeUI) Ok

func (ui *FakeUI) Ok()

func (*FakeUI) Outputs

func (ui *FakeUI) Outputs() string

func (*FakeUI) Prompt

func (ui *FakeUI) Prompt(message string, options *term.PromptOptions) *term.Prompt

func (*FakeUI) Say

func (ui *FakeUI) Say(template string, args ...interface{})

func (*FakeUI) SelectOne

func (ui *FakeUI) SelectOne(choices []string, template string, args ...interface{}) (int, error)

func (*FakeUI) Table

func (ui *FakeUI) Table(headers []string) term.Table

func (*FakeUI) Warn

func (ui *FakeUI) Warn(template string, args ...interface{})

func (*FakeUI) Writer

func (ui *FakeUI) Writer() io.Writer

Jump to

Keyboard shortcuts

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