Documentation
¶
Index ¶
- Constants
- func Bold(message string) string
- func BoldError(message string) string
- func BoldInfo(message string) string
- func BoldSuccess(message string) string
- func BoldWarning(message string) string
- func Dim(message string) string
- func Error(message string) string
- func FormatDuration(d time.Duration) string
- func Info(message string) string
- func Italic(message string) string
- func Muted(message string) string
- func NewlineAbove()
- func NewlineBelow()
- func PrintError(emoji, message string)
- func PrintInfo(indent int, label, value string)
- func PrintMuted(indent int, message string)
- func PrintSeparator()
- func PrintSuccess(emoji, message string)
- func PrintWarning(emoji, message string)
- func Success(message string) string
- func Underline(message string) string
- func Warning(message string) string
Constants ¶
const ( ColorReset = "\033[0m" ColorGreen = "\033[32m" // Success ColorRed = "\033[31m" // Errors ColorBlue = "\033[34m" // Info ColorYellow = "\033[33m" // Warnings ColorCyan = "\033[36m" // Highlights ColorGray = "\033[90m" // Muted text )
ANSI Color Constants
const ( FormatBold = "\033[1m" FormatDim = "\033[2m" FormatItalic = "\033[3m" FormatUnderline = "\033[4m" )
ANSI Text Formatting Constants
const ( EmojiStart = "✨" EmojiStop = "🛑" EmojiStatus = "⏱️" EmojiStats = "📊" EmojiLog = "📝" EmojiManual = "✍️" EmojiInit = "⚙️" EmojiExport = "📤" EmojiSuccess = "✅" EmojiError = "❌" EmojiWarning = "⚠️" EmojiInfo = "ℹ️" )
Emoji Constants
Variables ¶
This section is empty.
Functions ¶
func BoldSuccess ¶
Bold success combined formatting functions for common use cases
func BoldWarning ¶
Bold warning combined formatting functions for common use cases
func FormatDuration ¶
FormatDuration formats d into a concise, human-readable string using hours, minutes and seconds. It returns "<h>h <m>m <s>s" when the duration is at least one hour, "<m>m <s>s" when the duration is at least one minute but less than an hour, and "<s>s" for durations under one minute. Hours, minutes and seconds are derived from d using integer truncation (no fractional parts). This function is intended for non-negative durations; behavior for negative durations is unspecified.
func NewlineAbove ¶
func NewlineAbove()
NewlineAbove prints a single newline before output This creates visual separation from the user's command input
func PrintError ¶
func PrintError(emoji, message string)
PrintError prints an error message with emoji and color to stderr
func PrintInfo ¶
PrintInfo prints an info line with proper indentation and color indent specifies the number of spaces (typically 4 or 8) If value is empty, only label is printed
func PrintMuted ¶
PrintMuted prints muted (gray) text with optional indentation
func PrintSeparator ¶
func PrintSeparator()
PrintSeparator prints a subtle horizontal separator line
func PrintSuccess ¶
func PrintSuccess(emoji, message string)
PrintSuccess prints a success message with emoji and color to stdout
func PrintWarning ¶
func PrintWarning(emoji, message string)
PrintWarning prints a warning message with emoji and color to stdout
Types ¶
This section is empty.