out

package
v1.10.0-beta.0 Latest Latest
Warning

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

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

Documentation

Overview

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"
)

Functions

func ApplyTemplateFormatting added in v1.10.0

func ApplyTemplateFormatting(style StyleEnum, useColor bool, format string, a ...V) string

ApplyTemplateFormatting applies formatting to the provided template

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(style StyleEnum, format string, a ...V)

ErrT writes a stylized and templated error message to stderr

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 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 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(style StyleEnum, format string, a ...V)

T writes a stylized and templated message to stdout

func WarningT

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

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

Types

type StyleEnum

type StyleEnum int

StyleEnum is an enumeration of Style

const (
	Happy StyleEnum = iota
	SuccessType
	FailureType
	Celebration
	Conflict
	FatalType
	Notice
	Ready
	Running
	Provisioning
	Restarting
	Stopping
	Stopped
	Warning
	Waiting
	WaitingPods
	Usage
	Launch
	Sad
	ThumbsUp
	ThumbsDown
	Option
	Command
	LogEntry
	Deleted
	URL
	Documentation
	Issues
	Issue
	Check
	ISODownload
	FileDownload
	Caching
	StartingVM
	StartingNone
	Provisioner
	Resetting
	DeletingHost
	Copying
	Connectivity
	Confused
	Internet
	Mounting
	Celebrate
	ContainerRuntime
	Docker
	CRIO
	Containerd
	Permissions
	Enabling
	Shutdown
	Pulling
	HealthCheck
	Verifying
	VerifyingNoLine
	Kubectl
	Meh
	Embarrassed
	Tip
	Unmount
	MountOptions
	Fileserver
	Empty
	Workaround
	Sparkle
	Pause
	Unpause
	DryRun
	AddonEnable
	AddonDisable
	Shrug
)

All the Style constants available

type V

type V map[string]interface{}

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

Jump to

Keyboard shortcuts

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