luci: go.chromium.org/luci/common/data/text/color Index | Examples | Files

package color

import "go.chromium.org/luci/common/data/text/color"

Index

Examples

Package Files

strip.go

type StripWriter Uses

type StripWriter struct {
    io.Writer
}

StripWriter strips all color codes.

Code:

strip := &StripWriter{Writer: os.Stdout}
fmt.Fprint(strip, "before \033[31minside\u001b[0m after")

Output:

before inside after

func (*StripWriter) Write Uses

func (w *StripWriter) Write(p []byte) (n int, err error)

Package color imports 2 packages (graph) and is imported by 2 packages. Updated 2019-09-23. Refresh now. Tools for package owners.