Documentation ¶
Index ¶
- Variables
- func BlackString(str string) string
- func BlueString(str string) string
- func ColorString(str string, fgColor string, bgColor string, bold bool, dim bool, ...) string
- func CyanString(str string) string
- func GreenString(str string) string
- func GreyString(str string) string
- func HiBlueString(str string) string
- func HiCyanString(str string) string
- func HiGreenString(str string) string
- func HiGreyString(str string) string
- func HiMagentaString(str string) string
- func HiRedString(str string) string
- func HiYellowString(str string) string
- func MagentaString(str string) string
- func RedString(str string) string
- func WhiteString(str string) string
- func YellowString(str string) string
- type Colorize
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultColors map[string]string
DefaultColors are the default colors used when colorizing.
If the color is surrounded in underscores, such as "_blue_", then that color will be used for the background color.
Functions ¶
func BlackString ¶
func BlueString ¶
func ColorString ¶
func CyanString ¶
func GreenString ¶
func GreyString ¶
func HiBlueString ¶
func HiCyanString ¶
func HiGreenString ¶
func HiGreyString ¶
func HiMagentaString ¶
func HiRedString ¶
func HiYellowString ¶
func MagentaString ¶
func WhiteString ¶
func YellowString ¶
Types ¶
type Colorize ¶
type Colorize struct { // Colors maps a color string to the code for that color. The code // is a string so that you can use more complex colors to set foreground, // background, attributes, etc. For example, "boldblue" might be // "1;34" Colors map[string]string // If true, color attributes will be ignored. This is useful if you're // outputting to a location that doesn't support colors and you just // want the strings returned. Disable bool // Reset, if true, will reset the color after each colorization by // adding a reset code at the end. Reset bool }
Colorize colorizes your strings, giving you the ability to customize some of the colorization process.
The options in Colorize can be set to customize colorization. If you're only interested in the defaults, just use the top Color function directly, which creates a default Colorize.
Click to show internal directories.
Click to hide internal directories.