color

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: MIT Imports: 1 Imported by: 7

Documentation

Index

Constants

View Source
const (
	FgBlack = iota
	FgRed
	FgGreen
	FgYellow
	FgBlue
	FgPurple
)

Defines the color of the text

View Source
const (
	Regular = iota + 1
	Light
	Highlight
	Underline
)

Defines the style of the text

Variables

This section is empty.

Functions

func Apply

func Apply(color int, style int, format string, a ...interface{}) string

Apply applies a `color` and a `style` to the provided `format` It does this by using ANSI color codes

func Black

func Black(style int, format string, a ...interface{}) string

Black returns a string with black foreground

func Blue

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

Blue returns a string with blue foreground

func Green

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

Green returns a string with green foreground

func Red

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

Red returns a string with red foreground

func Yellow

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

Yellow returns a string with red foreground

Types

This section is empty.

Jump to

Keyboard shortcuts

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