Documentation
¶
Overview ¶
Package update provides a passive, best-effort version check that runs on every CLI invocation. It caches the latest known GitHub release so the check adds zero latency on the critical path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachePath ¶
func CachePath() string
CachePath returns the path to the update-check cache file. Falls back to a relative path when the home directory cannot be resolved.
func CachedLatestVersion ¶
CachedLatestVersion returns the latest version from the on-disk cache. Returns "" when the cache is absent, corrupt, or older than 48 hours.
func CheckAndRefresh ¶
func CheckAndRefresh(cachePath string)
CheckAndRefresh fetches the latest release from GitHub and writes it to cachePath when the existing cache is older than 24 hours. Errors are silently discarded — the update check is best-effort.
func InstallHint ¶
func InstallHint() string
InstallHint returns a human-readable upgrade command appropriate for the installation method inferred from the executable path. Falls back to the GitHub releases URL when detection is inconclusive.
Types ¶
This section is empty.