Documentation ¶
Index ¶
- Variables
- func Blue(text string) string
- func Bold(text string) string
- func BrightRed(text string) string
- func BrightYellow(text string) string
- func Color() aurora.Aurora
- func ColorizeJSON(json string, darkStyle bool) string
- func ColorizeStatus(status int) aurora.Value
- func Cyan(text string) string
- func Faint(text string) string
- func Green(text string) string
- func InitConsole()
- func Italic(text string) string
- func Linkify(text, url string) string
- func Magenta(text string) string
- func Red(text string) string
- func Spinner(text string, fn func() error) error
- func StrikeThrough(text string) string
- func Waiting(fn func() error) error
- func Yellow(text string) string
Constants ¶
This section is empty.
Variables ¶
var DisableColors = false
DisableColors disables all colors and other ANSI sequences.
var EnvironmentOverrideColors = true
EnvironmentOverrideColors overs coloring based on `CLICOLOR` and `CLICOLOR_FORCE`. Cf. https://bixense.com/clicolors/
var ForceColors = false
ForceColors forces the use of colors and other ANSI sequences.
Functions ¶
func BrightYellow ¶ added in v0.5.1
BrightYellow returns text colored bright yellow
func Color ¶
Color returns an aurora.Aurora instance with colors enabled or disabled depending on whether the writer supports colors.
func ColorizeJSON ¶
ColorizeJSON returns a colorized version of the input JSON, if the writer supports colors.
func ColorizeStatus ¶
ColorizeStatus returns a colorized number for HTTP status code
func InitConsole ¶ added in v0.4.1
func InitConsole()
InitConsole initializes any platform-specific aspect of the terminal. This method will run for all except Windows.
func Linkify ¶
Linkify returns an ANSI escape sequence with an hyperlink, if the writer supports colors.
func StrikeThrough ¶
StrikeThrough returns struck though text if the writer supports colors
Types ¶
This section is empty.