ansi

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Regular colors.
	Black   = "\x1b[0;30m"
	Green   = "\x1b[0;32m"
	Yellow  = "\x1b[0;33m"
	Blue    = "\x1b[0;34m"
	Magenta = "\x1b[0;35m"
	Cyan    = "\x1b[0;36m"
	Red     = "\x1b[0;31m"
	White   = "\x1b[0;37m"

	// Bold colors.
	BoldBlack   = "\x1b[1;30m"
	BoldRed     = "\x1b[1;31m"
	BoldGreen   = "\x1b[1;32m"
	BoldYellow  = "\x1b[1;33m"
	BoldBlue    = "\x1b[1;34m"
	BoldMagenta = "\x1b[1;35m"
	BoldCyan    = "\x1b[1;36m"
	BoldWhite   = "\x1b[1;37m"

	// Standard reset.
	Reset = "\x1b[0m"
)

Variables

This section is empty.

Functions

func Colorizer

func Colorizer(color string) func(string) string

Colorizer is a simple closure generator. You stick a color in and get back a closure which accepts a string and wraps that string in the ANSI color specified.

Types

This section is empty.

Jump to

Keyboard shortcuts

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