Documentation ¶
Overview ¶
Package upgrade downloads and compares releases, and upgrades the running binary.
Index ¶
Constants ¶
View Source
const ( MajorOlder Relation = -2 // Older by a major version (x in x.y.z or 0.x.y). Older = -1 // Older by a minor version (y or z in x.y.z, or y in 0.x.y) Equal = 0 // Versions are semantically equal Newer = 1 // Newer by a minor version (y or z in x.y.z, or y in 0.x.y) MajorNewer = 2 // Newer by a major version (x in x.y.z or 0.x.y). )
Variables ¶
Functions ¶
Types ¶
type Relation ¶ added in v0.10.15
type Relation int
func CompareVersions ¶
Returns a relation describing how a compares to b.
type Release ¶
type Release struct { Tag string `json:"tag_name"` Prerelease bool `json:"prerelease"` Assets []Asset `json:"assets"` }
func LatestGithubReleases ¶ added in v0.10.31
Returns the latest releases, including prereleases or not depending on the argument
func LatestRelease ¶
type SortByRelease ¶ added in v0.10.31
type SortByRelease []Release
func (SortByRelease) Len ¶ added in v0.10.31
func (s SortByRelease) Len() int
func (SortByRelease) Less ¶ added in v0.10.31
func (s SortByRelease) Less(i, j int) bool
func (SortByRelease) Swap ¶ added in v0.10.31
func (s SortByRelease) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.