ansi

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MPL-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// AnsiReset resets all terminal attributes and colors.
	AnsiReset = "\x1b[0m"

	// AnsiBlack sets the foreground color to normal-intensity black.
	AnsiBlack = "\x1b[30m"

	// AnsiRed sets the foreground color to normal-intensity red.
	AnsiRed = "\x1b[31m"

	// AnsiGreen sets the foreground color to normal-intensity green.
	AnsiGreen = "\x1b[32m"

	// AnsiYellow sets the foreground color to normal-intensity yellow.
	AnsiYellow = "\x1b[33m"

	// AnsiBlue sets the foreground color to normal-intensity blue.
	AnsiBlue = "\x1b[34m"

	// AnsiMagenta sets the foreground color to normal-intensity magenta.
	AnsiMagenta = "\x1b[35m"

	// AnsiCyan sets the foreground color to normal-intensity cyan.
	AnsiCyan = "\x1b[36m"

	// AnsiWhite sets the foreground color to normal-intensity white.
	AnsiWhite = "\x1b[37m"

	// AnsiHiBlack sets the foreground color to high-intensity black.
	// This is usually rendered as gray or dark gray.
	AnsiHiBlack = "\x1b[90m"

	// AnsiHiRed sets the foreground color to high-intensity red.
	AnsiHiRed = "\x1b[91m"

	// AnsiHiGreen sets the foreground color to high-intensity green.
	AnsiHiGreen = "\x1b[92m"

	// AnsiHiYellow sets the foreground color to high-intensity yellow.
	AnsiHiYellow = "\x1b[93m"

	// AnsiHiBlue sets the foreground color to high-intensity blue.
	AnsiHiBlue = "\x1b[94m"

	// AnsiHiMagenta sets the foreground color to high-intensity magenta.
	AnsiHiMagenta = "\x1b[95m"

	// AnsiHiCyan sets the foreground color to high-intensity cyan.
	AnsiHiCyan = "\x1b[96m"

	// AnsiHiWhite sets the foreground color to high-intensity white.
	AnsiHiWhite = "\x1b[97m"
)

Variables

This section is empty.

Functions

func StripANSI

func StripANSI(buf []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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