colorable

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableColorsStdout

func EnableColorsStdout(enabled *bool) func()

EnableColorsStdout enable colors if possible.

func NewColorable

func NewColorable(file *os.File) io.Writer

NewColorable returns new instance of Writer which handles escape sequence.

func NewColorableStderr

func NewColorableStderr() io.Writer

NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.

func NewColorableStdout

func NewColorableStdout() io.Writer

NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.

func NewNonColorable

func NewNonColorable(w io.Writer) io.Writer

NewNonColorable returns new instance of Writer which removes escape sequence from Writer.

Types

type NonColorable

type NonColorable struct {
	// contains filtered or unexported fields
}

NonColorable holds writer but removes escape sequence.

func (*NonColorable) Write

func (w *NonColorable) Write(data []byte) (n int, err error)

Write writes data on console

Jump to

Keyboard shortcuts

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