go-colorable: github.com/mattn/go-colorable Index | Files

package colorable

import "github.com/mattn/go-colorable"

Index

Package Files

colorable_others.go noncolorable.go

func EnableColorsStdout Uses

func EnableColorsStdout(enabled *bool) func()

EnableColorsStdout enable colors if possible.

func NewColorable Uses

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

NewColorable returns new instance of Writer which handles escape sequence.

func NewColorableStderr Uses

func NewColorableStderr() io.Writer

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

func NewColorableStdout Uses

func NewColorableStdout() io.Writer

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

func NewNonColorable Uses

func NewNonColorable(w io.Writer) io.Writer

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

type NonColorable Uses

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

NonColorable holds writer but removes escape sequence.

func (*NonColorable) Write Uses

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

Write writes data on console

Package colorable imports 4 packages (graph) and is imported by 1467 packages. Updated 2020-06-28. Refresh now. Tools for package owners.