color

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CodeSuccess = CodeFunc(Green)
	CodeFail    = CodeFunc(Red, Bold)
	CodeNeutral = CodeFunc(Cyan)
	CodeWarn    = CodeFunc(Yellow)
	CodeReset   = CodeFunc(Reset)
)
View Source
var NoColor bool

Functions

func Code

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

func CodeFunc

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

func Fail

func Fail(msg string) string

func HasColors

func HasColors(str string) bool

func Neutral

func Neutral(msg string) string

func RmColors

func RmColors(str string) string

func Success

func Success(msg string) string

func Warn

func Warn(msg string) string

Types

type Color

type Color int
const (
	// Foreground colors
	Black Color = iota + 30
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White

	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