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
_example
_example2
Version
v0.0.7
Published
Nov 3, 2016
Platform
darwin/amd64
Imports
3 packages
Last checked
now

Tools for package owners.