ui

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDurationShort

func FormatDurationShort(duration time.Duration) string

FormatDurationShort formats a duration using short units (s/m/h/d).

func FormatTimeAgeShort

func FormatTimeAgeShort(then time.Time, now time.Time) string

FormatTimeAgeShort returns a compact age string like "2m".

func FormatTimeAgo

func FormatTimeAgo(then time.Time, now time.Time) string

FormatTimeAgo returns a compact age string like "2m ago".

func HighlightID

func HighlightID(id string, prefixLen int) string

HighlightID returns an ID with its unique prefix highlighted.

func PrefixLength

func PrefixLength(prefixLengths map[string]int, id string) int

PrefixLength returns the unique prefix length for a case-insensitive ID lookup.

func UniqueIDPrefixLengths

func UniqueIDPrefixLengths(inputIDs []string) map[string]int

UniqueIDPrefixLengths returns the shortest unique prefix length for each ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL