colorer

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 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 Colorer

type Colorer struct{}

Colorer colors text for terminal output using the "github.com/fatih/color" package

func New added in v0.1.1

func New() *Colorer

New returns a pointer to a new Colorer struct

func (*Colorer) Black

func (c *Colorer) Black(text string) string

Black returns black text

func (*Colorer) Blue

func (c *Colorer) Blue(text string) string

Blue returns blue text

func (*Colorer) Color

func (c *Colorer) Color(text string, colorName string) (colored string, ok bool)

Color transforms a string into one of the available colors. If the color is not available the string will not be coloured and ok will be false.

func (*Colorer) Cyan

func (c *Colorer) Cyan(text string) string

Cyan returns cyan text

func (*Colorer) Green

func (c *Colorer) Green(text string) string

Green returns green text

func (*Colorer) Magenta

func (c *Colorer) Magenta(text string) string

Magenta returns magenta text

func (*Colorer) Red

func (c *Colorer) Red(text string) string

Red returns red text

func (*Colorer) White

func (c *Colorer) White(text string) string

White returns white text

func (*Colorer) Yellow

func (c *Colorer) Yellow(text string) string

Yellow returns yellow text

Jump to

Keyboard shortcuts

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