Help us shape the future of Go! Take the 2026 Go Developer Survey

terminal

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 6 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) ErrWriter added in v1.7.3

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

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) SetErrWriter added in v1.7.3

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

NOTE: SetErrWriter is added here since the method is part of the UI type Interface interface the method is not needed for testing

func (*FakeUI) SetQuiet added in v0.5.0

func (ui *FakeUI) SetQuiet(quiet bool)

func (*FakeUI) SetWriter added in v1.7.3

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

NOTE: SetErrWriter is added here since the method is part of the UI type Interface interface the method is not needed for testing

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