ui

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.0

type Config struct {
	VerbosityLevel
}

Config is the configuration for a logger.

type Logger added in v0.6.0

type Logger struct {
	Stdout, Stderr io.Writer
	Verbosity      VerbosityLevel
	// contains filtered or unexported fields
}

Logger writes CLI output at the appropriate level.

func New added in v0.6.0

func New() *Logger

New returns a new logger with the default settings.

func Noop added in v0.6.0

func Noop() *Logger

Noop returns a logger that does not print anything.

func (*Logger) Debug added in v0.6.0

func (l *Logger) Debug(a ...interface{})

Debug prints debug information.

func (*Logger) Deprecate added in v0.6.0

func (l *Logger) Deprecate(a ...interface{})

Deprecate prints deprecation warnings no more than once.

func (*Logger) Error added in v0.6.0

func (l *Logger) Error(a ...interface{})

Error prints application errors.

func (*Logger) Info added in v0.6.0

func (l *Logger) Info(a ...interface{})

Info prints normal application information.

func (Logger) PrintCommand added in v0.6.0

func (l Logger) PrintCommand(command string, namespaces ...string)

PrintCommand prints the command to be executed.

func (Logger) PrintCommandError added in v0.6.0

func (l Logger) PrintCommandError(err error)

PrintCommandError prints an error from a running command.

func (Logger) PrintCommandWithParenthetical added in v0.6.0

func (l Logger) PrintCommandWithParenthetical(command, parenthetical string, namespaces ...string)

PrintCommandWithParenthetical prints a command with additional information.

func (Logger) PrintEnvironment added in v0.6.0

func (l Logger) PrintEnvironment(variables map[string]*string)

PrintEnvironment prints when environment variables are set.

func (Logger) PrintSkipped added in v0.6.0

func (l Logger) PrintSkipped(command, reason string)

PrintSkipped prints the command skipped and the reason.

func (Logger) PrintTask added in v0.6.0

func (l Logger) PrintTask(taskName string)

PrintTask prints when a task has begun.

func (Logger) PrintTaskCompleted added in v0.6.0

func (l Logger) PrintTaskCompleted(taskName string)

PrintTaskCompleted prints when a task has completed.

func (Logger) PrintTaskFinally added in v0.6.0

func (l Logger) PrintTaskFinally(taskName string)

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

func (*Logger) Println added in v0.6.0

func (l *Logger) Println(a ...interface{})

Println prints a line directly.

func (*Logger) Warn added in v0.6.0

func (l *Logger) Warn(a ...interface{})

Warn prints at the warning level.

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