go-colorable – github.com/mattn/go-colorable Index | Files | Directories

package colorable

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

Index

Functions

func NewColorable

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

NewColorable return new instance of Writer which handle escape sequence.

func NewColorableStderr

func NewColorableStderr() io.Writer

NewColorableStderr return new instance of Writer which handle escape sequence for stderr.

func NewColorableStdout

func NewColorableStdout() io.Writer

NewColorableStdout return new instance of Writer which handle escape sequence for stdout.

func NewNonColorable

func NewNonColorable(w io.Writer) io.Writer

NewNonColorable return new instance of Writer which remove escape sequence from Writer.

Types

type NonColorable

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

NonColorable hold writer but remove escape sequence.

func (*NonColorable) Write

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

Write write data on console

Source Files

colorable_others.go noncolorable.go

Directories

PathSynopsis
cmd
cmd/colorable
_example
_example/escape-seq
_example/logrus
_example/title
Version
v0.1.1
Published
Feb 22, 2019
Platform
darwin/amd64
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.