Documentation
¶
Overview ¶
Package style provides consistent terminal styling for deco CLI output.
Index ¶
- Constants
- Variables
- func ErrorIcon() string
- func Fmt(c *color.Color, format string, args ...interface{}) string
- func Init()
- func IsEnabled() bool
- func SetMode(m ColorMode)
- func SeverityColor(severity string) *color.Color
- func StatusColor(status string) *color.Color
- func SuccessIcon() string
- func WarningIcon() string
- type ColorMode
Constants ¶
View Source
const ( SymbolSuccess = "✓" SymbolError = "✗" SymbolWarning = "!" SymbolInfo = "•" SymbolArrow = "→" SymbolBullet = "•" )
Symbols for consistent iconography
Variables ¶
View Source
var ( // Semantic styles Error = color.New(color.FgRed, color.Bold) Warning = color.New(color.FgYellow) Success = color.New(color.FgGreen) Info = color.New(color.FgCyan) Header = color.New(color.Bold) Muted = color.New(color.FgHiBlack) Code = color.New(color.FgMagenta) // Severity colors Critical = color.New(color.FgRed, color.Bold) High = color.New(color.FgRed) Medium = color.New(color.FgYellow) Low = color.New(color.FgBlue) // Status colors StatusDraft = color.New(color.FgYellow) StatusReview = color.New(color.FgCyan) StatusApproved = color.New(color.FgGreen) StatusArchived = color.New(color.FgHiBlack) )
Functions ¶
func SeverityColor ¶
SeverityColor returns the color for a severity level
func StatusColor ¶
StatusColor returns the color for a status
Types ¶
type ColorMode ¶
type ColorMode int
ColorMode controls when colors are used
func ParseColorMode ¶
ParseColorMode parses a color mode string (auto, always, never)
Click to show internal directories.
Click to hide internal directories.