update

package
v0.35.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Latest    string // latest version tag (e.g. "0.2.0")
	Current   string // current running version
	UpdateURL string // URL to the release page
}

Result holds the outcome of an update check.

func Check

func Check(owner, repo, currentVersion string) *Result

Check queries the GitHub API for the latest release of owner/repo and compares it with the current version. It returns nil on any error (network failure, bad JSON, etc.) so callers can safely ignore update checks.

func (*Result) NeedsUpdate

func (r *Result) NeedsUpdate() bool

NeedsUpdate returns true if the latest version is newer than current.

func (*Result) UpgradeCommand

func (r *Result) UpgradeCommand() string

UpgradeCommand returns the best-effort command to update the current installation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL