Documentation
¶
Index ¶
- Constants
- Variables
- func Banner(title string)
- func BlueText(s string) string
- func BoldText(s string) string
- func CyanText(s string) string
- func DimText(s string) string
- func FormatDuration(seconds int) string
- func FormatSize(bytes int64) string
- func GreenText(s string) string
- func Hint(msg string)
- func LogDebug(msg string)
- func LogError(msg string)
- func LogInfo(msg string)
- func LogSuccess(msg string)
- func LogWarn(msg string)
- func PrintKeyValue(key, value string)
- func RedText(s string) string
- func SectionHeader(title string)
- func Separator()
- func SetColorsEnabled(enabled bool)
- func ShortenHome(path, home string) string
- func Truncate(s string, max int) string
- func YellowText(s string) string
Constants ¶
View Source
const ( Red = "\033[0;31m" Green = "\033[0;32m" Yellow = "\033[1;33m" Blue = "\033[0;34m" Cyan = "\033[0;36m" Bold = "\033[1m" Dim = "\033[2m" Reset = "\033[0m" )
ANSI color codes
Variables ¶
View Source
var DebugEnabled bool
Functions ¶
func FormatDuration ¶
FormatDuration formats seconds into a human-readable duration.
func FormatSize ¶
FormatSize formats bytes into human-readable size.
func LogSuccess ¶
func LogSuccess(msg string)
func PrintKeyValue ¶
func PrintKeyValue(key, value string)
PrintKeyValue prints a key-value pair with dim key.
func SectionHeader ¶
func SectionHeader(title string)
SectionHeader prints a bold section header with a separator line.
func SetColorsEnabled ¶
func SetColorsEnabled(enabled bool)
SetColorsEnabled controls whether ANSI codes are emitted.
func ShortenHome ¶
ShortenHome replaces the home directory prefix with ~.
func YellowText ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.