Make short work of your logs!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
John Olheiser 262effd971 Fix legacy code (#4) 8 months ago
..
README.md Add extended and true colors (#3) 8 months ago
basic.go Fix legacy code (#4) 8 months ago
basic_colors.go Fix legacy code (#4) 8 months ago
basic_test.go Add extended and true colors (#3) 8 months ago
color.go Fix legacy code (#4) 8 months ago
color_test.go Add extended and true colors (#3) 8 months ago
extended.go Fix legacy code (#4) 8 months ago
extended_colors.go Add extended and true colors (#3) 8 months ago
rgb.go Add extended and true colors (#3) 8 months ago
rgb_test.go Add extended and true colors (#3) 8 months ago
true.go Fix legacy code (#4) 8 months ago

README.md

Color

Beaver comes with the color sub-package that can be used even without Beaver calls.

Color is an interface that simply needs Format(text string) string to fulfill it.
Any logger in beaver can be set to a Color.

Formatting a string with a single attribute

text := color.FgRed.Format("red")

Formatting a string with a full color

text := color.New(color.BgGreen, color.FgRed, color.Bold).Format("green background, red text, and bold")

Extended colors

Extended colors are 256-color extensions. They can be referred to by name, available in extended_colors.go.

True colors

True colors are full RBG colors, they can be either created with RGB values or parsed from hex.