Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceNoColors ¶
func ForceNoColors()
ForceNoColors force removing color to all symbols
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 }
Symbols struct contains all symbols
func BaseSymbols ¶ added in v0.3.0
func BaseSymbols() Symbols
BaseSymbols returns a set with the current OS symbols
func CurrentSymbols ¶ added in v0.2.0
func CurrentSymbols() Symbols
CurrentSymbols returns a set with the current OS symbols (colored if color enabled)
func FallbackSymbols ¶
func FallbackSymbols() Symbols
FallbackSymbols returns a set with the fallback 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
NormalSymbols returns a set with the normal symbols
Click to show internal directories.
Click to hide internal directories.