colors

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTerminal

func CheckTerminal()

CheckTerminal will check the TERM environment variable to determine the type of terminal being used and adjust the ANSI codes accordingly

func Printf

func Printf(format string, a ...any) error

Printf formats a colored string according to a format specifier. It's an explicit definition for creating color formatted output strings.

Types

type Color

type Color string
var (
	Reset   Color = "\033[0m"
	Red     Color = "\033[31m"
	Green   Color = "\033[32m"
	Yellow  Color = "\033[33m"
	Blue    Color = "\033[34m"
	Purple  Color = "\033[35m"
	Cyan    Color = "\033[36m"
	White   Color = "\033[37m"
	Default Color = "\033[39m"
)

Jump to

Keyboard shortcuts

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