console

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (

	// OverrideEnv is the environment variable used to override color/emoji usage
	OverrideEnv = "MINIKUBE_IN_STYLE"
)

Functions

func Err

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

Err writes a basic formatted string to stderr

func ErrLn

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

ErrLn writes a basic formatted string with a newline to stderr

func ErrStyle

func ErrStyle(style, format string, a ...interface{}) error

ErrStyle writes a stylized and formatted error message to stderr

func Failure

func Failure(format string, a ...interface{}) error

Failure is a shortcut for writing a styled failure message to stderr

func Fatal

func Fatal(format string, a ...interface{}) error

Fatal is a shortcut for writing a styled fatal message to stderr

func HasStyle

func HasStyle(style string) bool

HasStyle checks if a style exists

func Out

func Out(format string, a ...interface{}) error

Out writes a basic formatted string to stdout

func OutLn

func OutLn(format string, a ...interface{}) error

OutLn writes a basic formatted string with a newline to stdout

func OutStyle

func OutStyle(style, format string, a ...interface{}) error

OutStyle writes a stylized and formatted message to stdout

func SetErrFile

func SetErrFile(w fdWriter)

SetErrFile configures which writer error output goes to.

func SetOutFile

func SetOutFile(w fdWriter)

SetOutFile configures which writer standard output goes to.

func SetPreferredLanguage

func SetPreferredLanguage(s string) error

SetPreferredLanguage configures which language future messages should use, based on a LANG string.

func SetPreferredLanguageTag

func SetPreferredLanguageTag(l language.Tag)

SetPreferredLanguageTag configures which language future messages should use.

func Success

func Success(format string, a ...interface{}) error

Success is a shortcut for writing a styled success message to stdout

func Warning

func Warning(format string, a ...interface{}) error

Warning is a shortcut for writing a styled warning message to stderr

Types

This section is empty.

Jump to

Keyboard shortcuts

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