color

package
v0.0.0-...-ef45db5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StripWriter

type StripWriter struct {
	io.Writer
}

StripWriter strips all color codes.

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

before inside after

func (*StripWriter) Write

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL