decolorizer

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Overview

Package decolorizer provides utilities for removing color codes from data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer wraps a decolorizing filter around an embedded writer.

func New

func New(destination io.Writer) *Writer

New creates a new Writer that removes colors before writing to the underlying writer.

func (*Writer) Write

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

Write takes an unfiltered input []byte and filters out any ASCII terminal color sequences.

The cleaned data is then written to the internal writer.

Jump to

Keyboard shortcuts

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