Codebase list golang-github-go-kit-kit / 0c243515-0bf2-4b25-8735-9c1038fa7c1b/v0.12.0 log / term / colorwriter.go
0c243515-0bf2-4b25-8735-9c1038fa7c1b/v0.12.0

Tree @0c243515-0bf2-4b25-8735-9c1038fa7c1b/v0.12.0 (Download .tar.gz)

colorwriter.go @0c243515-0bf2-4b25-8735-9c1038fa7c1b/v0.12.0raw · history · blame

package term

import (
	"io"

	"github.com/go-kit/log/term"
)

// NewColorWriter returns an io.Writer that writes to w and provides cross
// platform support for ANSI color codes. If w is not a terminal it is
// returned unmodified.
func NewColorWriter(w io.Writer) io.Writer {
	return term.NewColorWriter(w)
}