Documentation
¶
Index ¶
Constants ¶
const Repo = "danlafeir/em"
Variables ¶
This section is empty.
Functions ¶
func AssetURL ¶
AssetURL returns the download URL for the binary matching the current OS and architecture, or an empty string if no matching asset was found.
func IsNewer ¶
IsNewer reports whether tagName is a newer release than currentVersion.
Both values may be "vX.Y.Z", "vX.Y.Z-N-gHASH" (git describe output), or a bare commit hash. A bare hash is treated as older than any semver tag so that users on pre-release dev builds always receive an upgrade prompt.
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
}
Asset is a single downloadable file attached to a release.
type Release ¶
Release is a minimal representation of a GitHub Release API response.
func LatestRelease ¶
LatestRelease fetches the latest published GitHub Release for em. Returns nil, nil when no releases have been published yet.
func LatestReleaseFor ¶
LatestReleaseFor fetches the latest release for the given "owner/repo". Separated for testing.