out

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stdout io.Writer = os.Stdout

Stdout is exported for tests

Functions

func AddPrefix

func AddPrefix(ctx context.Context, prefix string) context.Context

AddPrefix returns a context with the given prefix added to end of the existing prefix

func Black

func Black(ctx context.Context, format string, args ...interface{})

Black prints the string in black

func Blue

func Blue(ctx context.Context, format string, args ...interface{})

Blue prints the string in blue

func Cyan

func Cyan(ctx context.Context, format string, args ...interface{})

Cyan prints the string in cyan

func Debug

func Debug(ctx context.Context, format string, args ...interface{})

Debug prints the given string if the debug flag is set

func Green

func Green(ctx context.Context, format string, args ...interface{})

Green prints the string in green

func HasNewline added in v1.6.7

func HasNewline(ctx context.Context) bool

HasNewline returns the value of newline or the default (true)

func IsHidden

func IsHidden(ctx context.Context) bool

IsHidden returns true if any output should be hidden in this context

func Magenta

func Magenta(ctx context.Context, format string, args ...interface{})

Magenta prints the string in magenta

func Prefix

func Prefix(ctx context.Context) string

Prefix returns the prefix or an empty string

func Print

func Print(ctx context.Context, format string, args ...interface{})

Print formats and prints the given string

func Red

func Red(ctx context.Context, format string, args ...interface{})

Red prints the string in red

func White

func White(ctx context.Context, format string, args ...interface{})

White prints the string in white

func WithHidden

func WithHidden(ctx context.Context, hidden bool) context.Context

WithHidden returns a context with the flag value for hidden set

func WithNewline added in v1.6.7

func WithNewline(ctx context.Context, nl bool) context.Context

WithNewline returns a context with the flag value for newline set

func WithPrefix

func WithPrefix(ctx context.Context, prefix string) context.Context

WithPrefix returns a context with the given prefix set

func Yellow

func Yellow(ctx context.Context, format string, args ...interface{})

Yellow prints the string in yellow

Types

This section is empty.

Jump to

Keyboard shortcuts

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