Discover Packages
github.com/moshen/syncthing
upgrade
package
Version:
v0.9.7
Opens a new window with list of versions in this module.
Published: Aug 23, 2014
License: MIT
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Overview Index Constants Variables Functions Types CompareVersions(a, b) UpgradeTo(rel, archExtra) type Asset type Release LatestRelease(prerelease)
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package upgrade downloads and compares releases, and upgrades the running binary.
View Source
var (
ErrVersionUpToDate = errors .New ("current version is up to date")
ErrVersionUnknown = errors .New ("couldn't fetch release information")
ErrUpgradeUnsupported = errors .New ("upgrade unsupported")
)
Returns 1 if a>b, -1 if a<b and 0 if they are equal
Upgrade to the given release, saving the previous binary with a ".old" extension.
type Asset struct {
URL string `json:"url"`
Name string `json:"name"`
}
type Release struct {
Tag string `json:"tag_name"`
Prerelease bool `json:"prerelease"`
Assets []Asset `json:"assets"`
}
Returns the latest release, including prereleases or not depending on the argument
Source Files
¶
Click to show internal directories.
Click to hide internal directories.