colorable

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 4 Imported by: 1

README

colorable

Godoc Report Tests Coverage Sponsor

Colorable writer.

Authors

  • Yasuhiro Matsumoto (a.k.a mattn)
  • Eduard Urbach (minor modifications)

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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