Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶ added in v0.7.160
func Check() string
Check reports the latest release tag if it is newer than the running binary, or "" if there is nothing to report. It is the entry point for the update notice on every surface that shows one, so the CI guard lives here rather than at each call site — CI has nobody to read a notice. Test runs are covered by CheckForUpdate's "dev" guard: version.Value is only set from main.go, so it is always "dev" under test and nothing is fetched or written.
Callers that need to inject a cache dir or API base — the tests below — should use CheckForUpdate instead.
func CheckForUpdate ¶ added in v0.7.160
CheckForUpdate returns the latest release tag if it is strictly newer than current, or "" if up to date, the check fails, or current is "dev". Results are cached in cacheDir for 24 h to stay within GitHub's unauthenticated rate limit (60 req/hr) even for users running many commands. A cache entry with no version records that the window was used without a usable answer.
func PlatformAssetName ¶ added in v0.7.48
func PlatformAssetName() string
func SelfUpgradeCommand ¶ added in v0.7.160
func SelfUpgradeCommand() string
SelfUpgradeCommand returns the command that upgrades the running binary, accounting for Homebrew installs, which must not be replaced in place.
Types ¶
This section is empty.