Documentation
¶
Index ¶
- func FormatDurationShort(duration time.Duration) string
- func FormatTimeAgeShort(then time.Time, now time.Time) string
- func FormatTimeAgo(then time.Time, now time.Time) string
- func HighlightID(id string, prefixLen int) string
- func PrefixLength(prefixLengths map[string]int, id string) int
- func UniqueIDPrefixLengths(inputIDs []string) map[string]int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDurationShort ¶
FormatDurationShort formats a duration using short units (s/m/h/d).
func FormatTimeAgeShort ¶
FormatTimeAgeShort returns a compact age string like "2m".
func FormatTimeAgo ¶
FormatTimeAgo returns a compact age string like "2m ago".
func HighlightID ¶
HighlightID returns an ID with its unique prefix highlighted.
func PrefixLength ¶
PrefixLength returns the unique prefix length for a case-insensitive ID lookup.
func UniqueIDPrefixLengths ¶
UniqueIDPrefixLengths returns the shortest unique prefix length for each ID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.