colors

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Black

func Black(s interface{}) string

Black will accept an interface and return a colorized green string.

func Colored

func Colored(w io.Writer) io.Writer

Colored creates and initializes a new ansiColorWriter using io.Writer w as its initial contents. In the console of Windows, which change the foreground and background colors of the text by the escape sequence. In the console of other systems, which writes to w all text.

func Cyan

func Cyan(s interface{}) string

Cyan will accept an interface and return a colorized green string.

func Green

func Green(s interface{}) string

Green will accept an interface and return a colorized green string.

func Red

func Red(s interface{}) string

Red will accept an interface and return a colorized green string.

func Uncolored

func Uncolored(w io.Writer) io.Writer

Uncolored will accept and io.Writer and return a new io.Writer that won't include colors.

func White

func White(s interface{}) string

White will accept an interface and return a colorized green string.

func Yellow

func Yellow(s interface{}) string

Yellow will accept an interface and return a colorized green string.

Types

type ColorFunc

type ColorFunc func(interface{}) string

ColorFunc is a helper type to create colorized strings.

func Bold

func Bold(fn ColorFunc) ColorFunc

Bold will accept a ColorFunc and return a new ColorFunc that will make the string bold.

Jump to

Keyboard shortcuts

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