color

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsColorEnabled = true

	// Magenta outputs ANSI color if stdout is a tty
	Magenta = makeColorFunc("magenta")

	// Cyan outputs ANSI color if stdout is a tty
	Cyan = makeColorFunc("cyan")

	// Red outputs ANSI color if stdout is a tty
	Red = makeColorFunc("red")

	// Yellow outputs ANSI color if stdout is a tty
	Yellow = makeColorFunc("yellow")

	// Blue outputs ANSI color if stdout is a tty
	Blue = makeColorFunc("blue")

	// Green outputs ANSI color if stdout is a tty
	Green = makeColorFunc("green")

	// Gray outputs ANSI color if stdout is a tty
	Gray = makeColorFunc("black+h")

	// Bold outputs ANSI color if stdout is a tty
	Bold = makeColorFunc("default+b")
)

Functions

func IsEnabled

func IsEnabled() bool

func NewColorable

func NewColorable(out io.Writer) io.Writer

NewColorable returns an output stream that handles ANSI color sequences on Windows

Types

This section is empty.

Jump to

Keyboard shortcuts

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