out

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 19 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 Boxed added in v1.19.0

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

Boxed writes a stylized and templated message in a box to stdout using the default style config

func BoxedErr added in v1.20.0

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

BoxedErr writes a stylized and templated message in a box to stderr using the default style config

func BoxedWithConfig added in v1.23.0

func BoxedWithConfig(cfg box.Config, st style.Enum, title string, text string, a ...V)

BoxedWithConfig writes a templated message in a box with customized style config to stdout

func Err

func Err(s string)

Err writes a basic 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 Errf added in v1.34.0

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

Errf writes a basic formatted string 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 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 IsTerminal added in v1.19.0

func IsTerminal(w fdWriter) bool

IsTerminal returns whether we have a terminal or not

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 Output added in v1.19.0

func Output(file fdWriter, s string)

Output writes a basic string

func Outputf added in v1.34.0

func Outputf(file fdWriter, format string, a ...interface{})

Outputf writes a basic formatted string

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 SetSilent added in v1.19.0

func SetSilent(q bool)

SetSilent configures whether output is disabled or not

func Sprintf added in v1.19.0

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

Sprintf is used for returning the string (doesn't write anything)

func Step added in v1.15.0

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

Step writes a stylized and templated message to stdout

func String

func String(s string)

String writes a basic string to stdout

func Stringf added in v1.34.0

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

String writes a basic formatted string to stdout

func Styled added in v1.18.1

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

Styled writes a stylized and templated message to stdout

func SuccessT

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

SuccessT is a shortcut for writing a templated success 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