Documentation
¶
Overview ¶
Package selfupdate updates the diagrid-dev-dashboard binary in place from GitHub Releases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveLatest ¶ added in v0.0.6
ResolveLatest queries the GitHub releases API for repo's latest tag_name and returns it normalized (with a leading "v"). The /releases/latest endpoint excludes prereleases by design, so this always resolves to the latest stable release.
Types ¶
type Result ¶
type Result struct {
From string
To string
Skipped bool // true when already on the requested/latest version
}
Result describes the outcome of an update.
type Updater ¶
type Updater struct {
Repo string
APIBase string
DownloadBase string
HTTP *http.Client
GOOS string
GOARCH string
CurrentVersion string
ExecPath string
Out io.Writer
}
Updater performs an in-place self-update from GitHub Releases. The base URLs, HTTP client, platform, current version, and target path are all injectable so the update flow is fully testable.
Click to show internal directories.
Click to hide internal directories.