Documentation
¶
Overview ¶
Package format provides text formatting utilities for CLI output.
Index ¶
- func FormatRelativeTime(isoString string) string
- func FormatSimilarity(similarity float64) string
- func FormatStars(count int) string
- func RedactSensitive(str string) string
- func Separator(width int) string
- func TerminalWidth() int
- func TruncateText(text string, maxLength int) string
- func WrapText(text string, maxWidth, indent int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatRelativeTime ¶
FormatRelativeTime formats a relative time string (e.g., "2 hours ago", "in 14 minutes").
func FormatSimilarity ¶
FormatSimilarity formats a similarity score as a percentage.
func FormatStars ¶
FormatStars formats a star count as "1.2k" for >= 1000, "342" for < 1000.
func RedactSensitive ¶
RedactSensitive redacts sensitive information from a string.
func TerminalWidth ¶
func TerminalWidth() int
TerminalWidth returns the current terminal width, defaulting to 80.
func TruncateText ¶
TruncateText truncates text to a maximum length with ellipsis.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.