Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Red can be used as Sprintf, where the output it wrapped in escape characters which will render the text red in terminals. Red = color.New(color.Bold, color.FgRed).SprintfFunc() // Green can be used as Sprintf, where the output it wrapped in escape characters which will render the text green in terminals. Green = color.New(color.Bold, color.FgGreen).SprintfFunc() // Yellow can be used as Sprintf, where the output it wrapped in escape characters which will render the text yellow in terminals. Yellow = color.New(color.Bold, color.FgYellow).SprintfFunc() )
Functions ¶
func IntToCheckmark ¶
IntToCheckmark returns a string with ansi color instruction characters: a red ✘ if the argument is zero, a green ✔ otherwise.
func StringToCheckmark ¶
StringToCheckmark returns a string with ansi color instruction characters: a red ✘ if the argument is "0", a yellow ? if the argument is "", a green ✔ otherwise.
Types ¶
type Checkmark ¶
type Checkmark string
Checkmark type is a string with some functions attached.
func Btoc ¶ added in v1.4.6
Btoc returns a Checkmark from a boolean, red ✘ if the argument is false, a green ✔ otherwise.
Click to show internal directories.
Click to hide internal directories.