sequence

package
v0.0.0-...-1152eb5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Bright eight colors set
	Black   = "\033[30m"
	Red     = "\033[31m"
	Green   = "\033[32m"
	Yellow  = "\033[33m"
	Blue    = "\033[34m"
	Megenta = "\033[35m"
	Cyan    = "\033[36m"
	White   = "\033[37m"

	//Bright eight color set
	BBlack   = "\033[30;1m"
	BRed     = "\033[31;1m"
	BGreen   = "\033[32;1m"
	BYellow  = "\033[33;1m"
	BBlue    = "\033[34;1m"
	BMegenta = "\033[35;1m"
	BCyan    = "\033[36;1m"
	BWhite   = "\033[37;1m"
	Reset    = "\033[0m"

	//Background colors
	BkgBlack   = "\033[40m"
	BkgRed     = "\033[41m"
	BkgGreen   = "\033[42m"
	BkgYellow  = "\033[43m"
	BkgBlue    = "\033[44m"
	BkgMegenta = "\033[45m"
	BkgCyan    = "\033[46m"
	BkgWhite   = "\033[47m"

	//Bright background colors
	BBkgBlack   = "\033[40;1m"
	BBkgRed     = "\033[41;1m"
	BBkgGreen   = "\033[42;1m"
	BBkgYellow  = "\033[43;1m"
	BBkgBlue    = "\033[44;1m"
	BBkgMegenta = "\033[45;1m"
	BBkgCyan    = "\033[46;1m"
	BBkgWhite   = "\033[47;1m"

	//Text decorations
	Bold    = "\033[1m"
	ULine   = "\033[4m"
	Reverse = "\033[7m"

	//Clear codes - line from..
	CLEntire = "\033[2K"
	CLStart  = "\033[1K"
	CLEnd    = "\033[0K"

	//Clear codes - screen from..
	CLSEntire = "\033[H\033[2J"
	CLSBegin  = "\033[1J"
	CLSEnd    = "\033[0J"

	SeqOn bool
)

Hold static ansi special character sequences

Functions

func Off

func Off()

Reset will empty all escape sequences defined to empty string. This will allow for easier testing when running terminal applications as non interactive.

func On

func On()

func OnIfTerminal

func OnIfTerminal(a any)

OnIfTerminal will activate the package if an interactive terminal is detected. Otherwise, disable them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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