color

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CodeSuccess = CodeFunc(GreenFG)
	CodeFail    = CodeFunc(RedFG, Bold)
	CodeNeutral = CodeFunc(CyanFG)
	CodeWarn    = CodeFunc(YellowFG)
	CodeReset   = CodeFunc(Reset)
)
View Source
var NoColor bool

Functions

func Black

func Black(msg string) string

func Blue

func Blue(msg string) string

func Code

func Code(attr Color, args ...Color) string

func CodeFunc

func CodeFunc(attr Color, args ...Color) func() string

func Cyan

func Cyan(msg string) string

func Fail

func Fail(msg string) string

func Green

func Green(msg string) string

func HasColors

func HasColors(str string) bool

func Magenta

func Magenta(msg string) string

func Neutral

func Neutral(msg string) string

func Red

func Red(msg string) string

func RmColors

func RmColors(str string) string

func Success

func Success(msg string) string

func Warn

func Warn(msg string) string

func White

func White(msg string) string

func Yellow

func Yellow(msg string) string

Types

type Color

type Color int
const (
	// Foreground colors
	BlackFG Color = iota + 30
	RedFG
	GreenFG
	YellowFG
	BlueFG
	MagentaFG
	CyanFG
	WhiteFG

	Defaultt Color = 39

	Reset Color = 0
	Bold  Color = 1
)

Jump to

Keyboard shortcuts

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