colors

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetColored

func SetColored(isColored bool)

SetColored set all colors to default, if colored == false.

Types

type Color

type Color uint8

Color implementation.

const (
	Default Color = iota
	Green
	Red
	Yellow
	White
	Blue
	Cyan
	Magenta
	LightWhite
	LightRed
	Purple
	DefaultBold
	GreenBold
	RedBold
	YellowBold
	WhiteBold
	BlueBold
	CyanBold
	MagentaBold
	LightWhiteBold
	LightRedBold
	PurpleBold
)

type ColoredFmt

type ColoredFmt interface {
	Sprint(a ...interface{}) string
	Sprintf(format string, a ...interface{}) string
	Print(a ...interface{})
	Println(a ...interface{})
	Printf(format string, a ...interface{})
}

ColoredFmt colored formater interface with base functions.

func Fmt

func Fmt(c Color) ColoredFmt

Fmt return colored formater.

Jump to

Keyboard shortcuts

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