Documentation
¶
Overview ¶
Package ui provides consistent CLI output formatting utilities.
Index ¶
- Constants
- func BlankLine()
- func BlueText(text string) string
- func BoldText(text string) string
- func Color(text, color string) string
- func ColorEnabled() bool
- func Colorize(text string, codes ...string) string
- func CyanText(text string) string
- func DimText(text string) string
- func GrayText(text string) string
- func GreenText(text string) string
- func Info(format string, args ...any)
- func MagentaText(text string) string
- func RedText(text string) string
- func SetColorEnabled(enabled bool)
- func SetOutput(w io.Writer)
- func SimpleTable(pairs ...string)
- func Warning(format string, args ...any)
- func YellowText(text string) string
- type Table
Constants ¶
View Source
const ( Reset = "\033[0m" Bold = "\033[1m" Dim = "\033[2m" Italic = "\033[3m" Under = "\033[4m" // Foreground colors Black = "\033[30m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" // Bright foreground colors BrightBlack = "\033[90m" BrightRed = "\033[91m" BrightGreen = "\033[92m" BrightYellow = "\033[93m" BrightBlue = "\033[94m" BrightMagenta = "\033[95m" BrightCyan = "\033[96m" BrightWhite = "\033[97m" )
ANSI color codes
Variables ¶
This section is empty.
Functions ¶
func SetColorEnabled ¶
func SetColorEnabled(enabled bool)
SetColorEnabled overrides automatic color detection.
Types ¶
Click to show internal directories.
Click to hide internal directories.