colorization

package
v0.0.0-...-e089d42 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Reset    = "\x1b[0m"
	Red      = "\x1b[31m"
	Green    = "\x1b[32m"
	Yellow   = "\x1b[33m"
	Blue     = "\x1b[34m"
	White    = "\x1b[37m"
	BgRed    = "\x1b[41m"
	BgGreen  = "\x1b[42m"
	BgYellow = "\x1b[43m"
	BgBlue   = "\x1b[44m"
	BgWhite  = "\x1b[47m"
	Bold     = "\x1b[1m"
	Italic   = "\x1b[3m"
	Undrline = "\x1b[4m"
	Cancel   = "\x1b[9m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TextStyle

type TextStyle struct {
	ForeColor string
	BgColor   string
	Bold      bool
	Italic    bool
	Undrline  bool
	Cancel    bool
}

func Judge

func Judge(f fs.FileMode) TextStyle

func (TextStyle) Colorize

func (ts TextStyle) Colorize(text string) string

Jump to

Keyboard shortcuts

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