terminal

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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) Errors added in v0.5.0

func (ui *FakeUI) Errors() string

func (*FakeUI) Failed

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

func (*FakeUI) Info added in v0.5.0

func (ui *FakeUI) Info(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) Print added in v0.5.0

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

func (*FakeUI) Prompt

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

func (*FakeUI) Quiet added in v0.5.0

func (ui *FakeUI) Quiet() bool

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) SetQuiet added in v0.5.0

func (ui *FakeUI) SetQuiet(quiet bool)

func (*FakeUI) Table

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

func (*FakeUI) Verbose added in v0.5.0

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

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