Run vet and lint. Make us lint clean.
This commit is contained in:
@@ -40,7 +40,6 @@ func init() {
|
||||
upgradeUnlocked <- true
|
||||
}
|
||||
|
||||
// A wrapper around actual implementations
|
||||
func To(rel Release) error {
|
||||
select {
|
||||
case <-upgradeUnlocked:
|
||||
@@ -60,7 +59,6 @@ func To(rel Release) error {
|
||||
}
|
||||
}
|
||||
|
||||
// A wrapper around actual implementations
|
||||
func ToURL(url string) error {
|
||||
select {
|
||||
case <-upgradeUnlocked:
|
||||
@@ -90,7 +88,7 @@ const (
|
||||
MajorNewer = 2 // Newer by a major version (x in x.y.z or 0.x.y).
|
||||
)
|
||||
|
||||
// Returns a relation describing how a compares to b.
|
||||
// CompareVersions returns a relation describing how a compares to b.
|
||||
func CompareVersions(a, b string) Relation {
|
||||
arel, apre := versionParts(a)
|
||||
brel, bpre := versionParts(b)
|
||||
|
||||
@@ -27,7 +27,8 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Returns the latest releases, including prereleases or not depending on the argument
|
||||
// LatestGithubReleases returns the latest releases, including prereleases or
|
||||
// not depending on the argument
|
||||
func LatestGithubReleases(version string) ([]Release, error) {
|
||||
resp, err := http.Get("https://api.github.com/repos/syncthing/syncthing/releases?per_page=30")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user