out

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package out provides a mechanism for sending localized, stylized output to the console.

Package out provides a mechanism for sending localized, stylized output to the console.

Package out provides a mechanism for sending localized, stylized output to the console.

Index

Constants

View Source
const MaxLogEntries = 3

MaxLogEntries controls the number of log entries to show for each source

Variables

View Source
var (

	// OverrideEnv is the environment variable used to override color/emoji usage
	OverrideEnv = "MINIKUBE_IN_STYLE"
	// JSON is whether or not we should output stdout in JSON format. Set using SetJSON()
	JSON = false
)

Functions

func DisplayError added in v1.10.0

func DisplayError(msg string, err error)

DisplayError prints the error and displays the standard minikube error messaging

func Err

func Err(format string, a ...interface{})

Err writes a basic formatted string to stderr

func ErrLn

func ErrLn(format string, a ...interface{})

ErrLn writes a basic formatted string with a newline to stderr

func ErrT

func ErrT(st style.Enum, format string, a ...V)

ErrT writes a stylized and templated error message to stderr

func Error added in v1.13.0

func Error(k reason.Kind, format string, a ...V)

Error shows an an error reason

func FailureT

func FailureT(format string, a ...V)

FailureT is a shortcut for writing a templated failure message to stderr

func FatalT

func FatalT(format string, a ...V)

FatalT is a shortcut for writing a templated fatal message to stderr

func Fmt added in v1.13.0

func Fmt(format string, a ...V) string

Fmt applies formatting and translation

func Infof added in v1.12.1

func Infof(format string, a ...V)

Infof is used for informational logs (options, env variables, etc)

func Ln

func Ln(format string, a ...interface{})

Ln writes a basic formatted string with a newline to stdout

func LogEntries added in v1.10.0

func LogEntries(msg string, err error, entries map[string][]string)

LogEntries outputs an error along with any important log entries.

func SetErrFile

func SetErrFile(w fdWriter)

SetErrFile configures which writer error output goes to.

func SetJSON added in v1.12.1

func SetJSON(j bool)

SetJSON configures printing to STDOUT in JSON

func SetOutFile

func SetOutFile(w fdWriter)

SetOutFile configures which writer standard output goes to.

func String

func String(format string, a ...interface{})

String writes a basic formatted string to stdout

func SuccessT

func SuccessT(format string, a ...V)

SuccessT is a shortcut for writing a templated success message to stdout

func T

func T(st style.Enum, format string, a ...V)

T writes a stylized and templated message to stdout

func WarnReason added in v1.13.0

func WarnReason(k reason.Kind, format string, a ...V)

WarnReason shows a warning reason

func WarningT

func WarningT(format string, a ...V)

WarningT is a shortcut for writing a templated warning message to stderr

Types

type V

type V map[string]interface{}

V is a convenience wrapper for templating, it represents the variable key/value pair.

Directories

Path Synopsis
Package register contains all the logic to print out `minikube start` in JSON
Package register contains all the logic to print out `minikube start` in JSON

Jump to

Keyboard shortcuts

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