colors

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedBg       = "\x1b[48;5;225m"
	GreenBG     = "\x1b[48;5;159m"
	BoldGreenBG = "\x1b[48;5;23m"
	BoldRedBg   = "\x1b[48;5;127m"

	BoldWhite = "\x1b[1;38;5;255m"

	Dim       = "\x1b[2m"
	Greendiff = "\x1b[38;5;22m"
	Reddiff   = "\x1b[38;5;52m"
	Yellow    = "\x1b[33;1m"
	White     = "\x1b[38;5;255m"
	Green     = "\x1b[32;1m"
	Red       = "\x1b[31;1m"
)

Variables

View Source
var NOCOLOR = isNoColor()

Functions

func Fprint

func Fprint(w io.Writer, color, s string)

func FprintBg

func FprintBg(w io.Writer, bgColor, color, s string)

func FprintDelete

func FprintDelete(w io.Writer, s string)

func FprintDeleteBold

func FprintDeleteBold(w io.Writer, s string)

func FprintEqual

func FprintEqual(w io.Writer, s string)

* Only used for the pretty_diff

func FprintInsert

func FprintInsert(w io.Writer, s string)

func FprintInsertBold

func FprintInsertBold(w io.Writer, s string)

func FprintRange

func FprintRange(w io.Writer, r1, r2 string)

func Sprint

func Sprint(color, s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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