Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogIfUpdateAvailable ¶
func LogIfUpdateAvailable(repo, currentVersion, binaryName string)
LogIfUpdateAvailable checks for updates and logs a warning if one is available.
func SelfUpdate ¶
SelfUpdate downloads the latest release, verifies its checksum, and replaces the current binary. binaryName is the base name used to look up the checksum (e.g. "gatecrash-server").
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
}
Asset represents a release asset.
type CheckResult ¶
type CheckResult struct {
CurrentVersion string
LatestVersion string
UpdateAvailable bool
DownloadURL string
ChecksumURL string
}
CheckResult contains the result of a version check.
func Check ¶
func Check(repo, currentVersion, binaryName string) (*CheckResult, error)
Check queries GitHub for the latest release and compares with current version. binaryName is the base name of the binary (e.g. "gatecrash" or "gatecrash-server").
type GitHubRelease ¶
GitHubRelease represents a GitHub release API response.
Click to show internal directories.
Click to hide internal directories.