Documentation
¶
Overview ¶
Package update implements the self-update flow: checking the public releases repo for a newer version and swapping the running binary in place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
CompareVersions returns positive when a is newer than b, negative when older, zero when equal. Pre-releases (1.24.0-rc1) sort below their release (1.24.0); non-semver strings (dev builds: "", "dev") sort below every release.
func MarkSkipped ¶
func MarkSkipped(version string)
MarkSkipped records that the user declined the given version.
Types ¶
type Release ¶
type Release struct {
Version string // without the leading "v"
Asset string // asset download URL for this platform
}
Release describes a newer version available for install.
func Check ¶
Check forces a check ignoring the daily cache (used by /update), while still honoring QMAX_NO_UPDATE_CHECK and dev builds.
func MaybeCheck ¶
MaybeCheck returns a Release when a newer version exists and the user should be asked about it now (respecting the daily cache, the skip marker, dev builds, and QMAX_NO_UPDATE_CHECK). Network failures return nil — the check must never break startup.