Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install downloads the release asset for the current OS/arch, verifies its SHA256 checksum against checksums.txt, and replaces the running binary. token is an optional Bearer token for GitHub Enterprise authentication; pass "" if not needed.
func RecordCheck ¶
RecordCheck writes the current time to the cache file. Only called after a successful response from CheckLatest (not on network errors).
Types ¶
type Release ¶
type Release struct {
Version string // e.g. "1.2.0" (no leading "v")
TagName string // e.g. "v1.2.0"
}
Release holds the relevant fields from a GitHub release.
func CheckLatest ¶
CheckLatest fetches the latest GitHub release and returns it along with whether it is newer than currentVersion. token is an optional Bearer token for GitHub Enterprise authentication; pass "" if not needed. Returns a real error on failure — callers decide whether to surface or swallow it.