colors

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.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
	Orange
	OrangeBold
)

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