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) string
- func Cyan(text string) string
- func Faint(text string) string
- func Green(text string) string
- func InitConsole()
- func Initialize(shouldDisableColors bool)
- func Italic(text string) string
- func Magenta(text string) string
- func Red(text string) string
- func Spinner(text string, fn func() error) error
- func URL(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 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 Initialize ¶ added in v1.0.0
func Initialize(shouldDisableColors bool)
Initialize re-instantiates the Aurora instance This initialization step is necessary because the parsing of the --no-color flag is done fairly late in the application cycle.
Types ¶
This section is empty.