output

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package output is responsible for formatting the final output / errors the user sees in the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatError

func FormatError(summary string, err error) string

FormatError outputs the error with proper formatting for CLI.

Types

type UI added in v0.5.0

type UI struct {
	BasicUI cli.Ui
}

UI is used for interfacing with the terminal

func (*UI) Ask added in v0.5.0

func (u *UI) Ask(query string) (string, error)

Ask asks the user for input using the given query. The response is returned as the given string, or an error.

func (*UI) AskSecret added in v0.5.0

func (u *UI) AskSecret(query string) (string, error)

AskSecret asks the user for input using the given query, but does not echo the keystrokes to the terminal.

func (*UI) Error added in v0.5.0

func (u *UI) Error(message string)

Error is used to output error messages

func (*UI) Info added in v0.5.0

func (u *UI) Info(message string)

Info is used to output info messages

func (*UI) Output added in v0.5.0

func (u *UI) Output(message string)

Output is used to output messages with no formatting applied

func (*UI) Warn added in v0.5.0

func (u *UI) Warn(message string)

Warn is used to output warn messages

Jump to

Keyboard shortcuts

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