Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyChecksum ¶
VerifyChecksum checks the SHA256 of archivePath against the checksums file.
Types ¶
type Config ¶
type Config struct {
CheckInterval time.Duration
Repo string // "owner/repo"
InstallDir string
Version string // updater's own version (used for user-agent)
}
Config holds the updater configuration.
type GitHubAsset ¶
type GitHubAsset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
}
GitHubAsset represents a release asset.
type GitHubRelease ¶
type GitHubRelease struct {
TagName string `json:"tag_name"`
Assets []GitHubAsset `json:"assets"`
}
GitHubRelease represents a subset of the GitHub release API response.
type Semver ¶
Semver represents a parsed semantic version.
func ParseSemver ¶
ParseSemver parses a version string like "v1.2.3" or "1.2.3" or "v1.2.3-dirty". It strips the "v" prefix and any suffix after a hyphen.
Click to show internal directories.
Click to hide internal directories.