Help us shape the future of Go! Take the 2026 Go Developer Survey

color

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color uint8

Color represents a text color.

const (
	Black Color = iota + 30
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

Terminal Colors

func (Color) Add

func (c Color) Add(s string) string

Add adds the color to the given string

func (Color) Any

func (c Color) Any(s interface{}) string

Any adds the color to any type

func (Color) Bold

func (c Color) Bold(s string) string

Bold adds a bold color to the given string

func (Color) Print

func (c Color) Print(s ...any)

Print .

func (Color) Printf

func (c Color) Printf(format string, s ...any)

Printf .

Jump to

Keyboard shortcuts

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