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

ui

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogUI

func NewLogUI(ui cli.Ui) (cli.Ui, error)

NewLogUI generates a new cli.Ui that can be used for commands that write log lines to the terminal. The caller is required to pass a cli.BasicUi so we have access to the underlying writers.

Currently, the passed ui needs to be either *cli.ColoredUi or *cli.BasicUi to work correctly. If more are needed, please add them.

Types

type LogUI

type LogUI struct {
	// contains filtered or unexported fields
}

LogUI is an implementation of the cli.Ui interface which can be used for logging outputs. It differs from cli.BasicUi in the only fact that it does not add a newline after each UI write.

func (*LogUI) Ask

func (l *LogUI) Ask(query string) (string, error)

Ask implements the Ask function of the cli.Ui interface.

func (*LogUI) AskSecret

func (l *LogUI) AskSecret(query string) (string, error)

AskSecret implements the AskSecret function of the cli.Ui interface.

func (*LogUI) Error

func (l *LogUI) Error(message string)

Error implements the Error function of the cli.Ui interface.

func (*LogUI) Info

func (l *LogUI) Info(message string)

Info implements the Info function of the cli.Ui interface.

func (*LogUI) Output

func (l *LogUI) Output(message string)

Output implements the Output function of the cli.Ui interface.

func (*LogUI) Warn

func (l *LogUI) Warn(message string)

Warn implements the Warn function of the cli.Ui interface.

Jump to

Keyboard shortcuts

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