ui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Verbosity allows the verbosity of output to be set.
	Verbosity = VerbosityLevelNormal

	// LoggerStdout is a logger that prints to stdout.
	LoggerStdout = log.New(os.Stdout, "", 0)

	// LoggerStderr is a logger that prints to stderr.
	LoggerStderr = log.New(os.Stderr, "", 0)
)

Functions

func Debug

func Debug(a ...interface{})

Debug prints info only in verbose mode.

func Deprecate added in v0.3.2

func Deprecate(a ...interface{})

Deprecate prints a deprecation warning no more than once.

func Error

func Error(a ...interface{})

Error prints an application error.

func Info

func Info(a ...interface{})

Info prints application info.

func PrintCommand

func PrintCommand(command, context string)

PrintCommand prints the command to be executed.

func PrintCommandError

func PrintCommandError(err error)

PrintCommandError prints an error from a running command.

func PrintCommandWithParenthetical added in v0.4.1

func PrintCommandWithParenthetical(command, context, parenthetical string)

PrintCommandWithParenthetical prints a command with additional information.

func PrintEnvironment added in v0.2.1

func PrintEnvironment(variables map[string]*string)

PrintEnvironment prints when environment variables are set.

func PrintSkipped

func PrintSkipped(command string, reason string)

PrintSkipped prints the command skipped and the reason.

func PrintTask added in v0.4.1

func PrintTask(taskName string, asSubTask bool)

PrintTask prints when a task has begun.

func PrintTaskCompleted added in v0.4.1

func PrintTaskCompleted(taskName string, asSubTask bool)

PrintTaskCompleted prints when a task has completed.

func PrintTaskFinally added in v0.4.1

func PrintTaskFinally(taskName string, asSubTask bool)

PrintTaskFinally prints when a task's finally clause has begun.

func Println added in v0.2.0

func Println(a ...interface{})

Println prints a message to stdout.

func Warn

func Warn(a ...interface{})

Warn prints an application warning.

Types

type VerbosityLevel added in v0.2.0

type VerbosityLevel int

VerbosityLevel describes the verbosity of output.

const (
	// VerbosityLevelSilent does not print any output to stderr/stdout.
	VerbosityLevelSilent VerbosityLevel = iota
	// VerbosityLevelQuiet only prints command output and error messages.
	VerbosityLevelQuiet VerbosityLevel = iota
	// VerbosityLevelNormal is the normal level of verbosity.
	VerbosityLevelNormal VerbosityLevel = iota
	// VerbosityLevelVerbose prints all messages, include debug info.
	VerbosityLevelVerbose VerbosityLevel = iota
)

func (VerbosityLevel) String added in v0.2.0

func (v VerbosityLevel) String() string

Jump to

Keyboard shortcuts

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