color

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package color provides facility to make normal text into ansi-colored text so as to output on console.

Index

Constants

View Source
const (
	Reset = "Reset"

	Bright     = "Bright"
	Dim        = "Dim"
	Underscore = "Underscore"
	Blink      = "Blink"
	Reverse    = "Reverse"
	Hidden     = "Hidden"

	FgBlack   = "FgBlack"
	FgRed     = "FgRed"
	FgGreen   = "FgGreen"
	FgYellow  = "FgYellow"
	FgBlue    = "FgBlue"
	FgMagenta = "FgMagenta"
	FgCyan    = "FgCyan"
	FgWhite   = "FgWhite"

	BgBlack   = "BgBlack"
	BgRed     = "BgRed"
	BgGreen   = "BgGreen"
	BgYellow  = "BgYellow"
	BgBlue    = "BgBlue"
	BgMagenta = "BgMagenta"
	BgCyan    = "BgCyan"
	BgWhite   = "BgWhite"
)

Variables

This section is empty.

Functions

func Blue

func Blue(format string, a ...interface{}) string

func Colorize

func Colorize(colors []string, format string, a ...interface{}) (s string)

Convert a string to string with color escape info that can output to console.

func Cyan

func Cyan(format string, a ...interface{}) string

func Green

func Green(format string, a ...interface{}) string

func Magenta

func Magenta(format string, a ...interface{}) string

func Red

func Red(format string, a ...interface{}) string

func Yellow

func Yellow(format string, a ...interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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