Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Info symbol Success symbol Ok symbol Warning symbol Warn symbol Error symbol )
Functions ¶
func AutodetectTTY ¶
func ForceColors ¶
func ForceColors()
func ForceNoColors ¶
func ForceNoColors()
Example ¶
ForceNoColors() fmt.Println("\nno color") fmt.Printf("%s info\n", Info) fmt.Printf("%s success\n", Success) fmt.Printf("%s warning\n", Warn) fmt.Printf("%s error\n", Error)
Output: no color ℹ info ✔ success ⚠ warning ✖ error
Types ¶
type Symbols ¶
type Symbols struct { Info symbol Success symbol Ok symbol Warning symbol Warn symbol Error symbol }
func FallbackSymbols ¶
func FallbackSymbols() Symbols
Example ¶
f := FallbackSymbols() fmt.Println("\nfallback") fmt.Printf("%s info\n", f.Info) fmt.Printf("%s success\n", f.Success) fmt.Printf("%s warning\n", f.Warning) fmt.Printf("%s error\n", f.Error)
Output: fallback i info √ success ‼ warning × error
func NormalSymbols ¶
func NormalSymbols() Symbols
Click to show internal directories.
Click to hide internal directories.