chore: style fixes from go fix (#10846)
Just `go fix ./...` Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -211,7 +211,7 @@ func CompareVersions(a, b string) Relation {
|
||||
|
||||
// Split a version into parts.
|
||||
// "1.2.3-beta.2" -> []int{1, 2, 3}, []interface{}{"beta", 2}
|
||||
func versionParts(v string) ([]int, []interface{}) {
|
||||
func versionParts(v string) ([]int, []any) {
|
||||
if strings.HasPrefix(v, "v") || strings.HasPrefix(v, "V") {
|
||||
// Strip initial 'v' or 'V' prefix if present.
|
||||
v = v[1:]
|
||||
@@ -226,10 +226,10 @@ func versionParts(v string) ([]int, []interface{}) {
|
||||
release[i] = v
|
||||
}
|
||||
|
||||
var prerelease []interface{}
|
||||
var prerelease []any
|
||||
if len(parts) > 1 {
|
||||
fields = strings.Split(parts[1], ".")
|
||||
prerelease = make([]interface{}, len(fields))
|
||||
prerelease = make([]any, len(fields))
|
||||
for i, s := range fields {
|
||||
v, err := strconv.Atoi(s)
|
||||
if err == nil {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//go:build !noupgrade && !ios
|
||||
// +build !noupgrade,!ios
|
||||
|
||||
package upgrade
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//go:build !noupgrade
|
||||
// +build !noupgrade
|
||||
|
||||
package upgrade
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//go:build noupgrade || ios
|
||||
// +build noupgrade ios
|
||||
|
||||
package upgrade
|
||||
|
||||
|
||||
Reference in New Issue
Block a user