Merge pull request #367 from NVIDIA/dependabot/go_modules/release-1.14/golang.org/x/mod-0.15.0

Bump golang.org/x/mod from 0.5.0 to 0.15.0
This commit is contained in:
Evan Lezar 2024-02-19 11:10:59 +01:00 committed by GitHub
commit 99c955a3f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 18 deletions

2
go.mod
View File

@ -11,7 +11,7 @@ require (
github.com/stretchr/testify v1.8.1 github.com/stretchr/testify v1.8.1
github.com/urfave/cli/v2 v2.27.1 github.com/urfave/cli/v2 v2.27.1
gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884 gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884
golang.org/x/mod v0.5.0 golang.org/x/mod v0.15.0
golang.org/x/sys v0.17.0 golang.org/x/sys v0.17.0
tags.cncf.io/container-device-interface v0.6.2 tags.cncf.io/container-device-interface v0.6.2
tags.cncf.io/container-device-interface/specs-go v0.6.0 tags.cncf.io/container-device-interface/specs-go v0.6.0

4
go.sum
View File

@ -71,8 +71,8 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884 h1:V0LUbfm4kVA1CPG8FgG9AGZqa3ykE5U12Gd3PZgoItA= gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884 h1:V0LUbfm4kVA1CPG8FgG9AGZqa3ykE5U12Gd3PZgoItA=
gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884/go.mod h1:/x5Ky1ZJNyCjDkgSL1atII0EFKQF5WaIHKeP5nkaQfk= gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230818092907-09424fdc8884/go.mod h1:/x5Ky1ZJNyCjDkgSL1atII0EFKQF5WaIHKeP5nkaQfk=
golang.org/x/mod v0.5.0 h1:UG21uOlmZabA4fW5i7ZX6bjw1xELEGg/ZLgZq9auk/Q= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

View File

@ -32,7 +32,6 @@ type parsed struct {
short string short string
prerelease string prerelease string
build string build string
err string
} }
// IsValid reports whether v is a valid semantic version string. // IsValid reports whether v is a valid semantic version string.
@ -141,7 +140,7 @@ func Compare(v, w string) int {
// Max canonicalizes its arguments and then returns the version string // Max canonicalizes its arguments and then returns the version string
// that compares greater. // that compares greater.
// //
// Deprecated: use Compare instead. In most cases, returning a canonicalized // Deprecated: use [Compare] instead. In most cases, returning a canonicalized
// version is not expected or desired. // version is not expected or desired.
func Max(v, w string) string { func Max(v, w string) string {
v = Canonical(v) v = Canonical(v)
@ -152,7 +151,7 @@ func Max(v, w string) string {
return w return w
} }
// ByVersion implements sort.Interface for sorting semantic version strings. // ByVersion implements [sort.Interface] for sorting semantic version strings.
type ByVersion []string type ByVersion []string
func (vs ByVersion) Len() int { return len(vs) } func (vs ByVersion) Len() int { return len(vs) }
@ -165,19 +164,17 @@ func (vs ByVersion) Less(i, j int) bool {
return vs[i] < vs[j] return vs[i] < vs[j]
} }
// Sort sorts a list of semantic version strings using ByVersion. // Sort sorts a list of semantic version strings using [ByVersion].
func Sort(list []string) { func Sort(list []string) {
sort.Sort(ByVersion(list)) sort.Sort(ByVersion(list))
} }
func parse(v string) (p parsed, ok bool) { func parse(v string) (p parsed, ok bool) {
if v == "" || v[0] != 'v' { if v == "" || v[0] != 'v' {
p.err = "missing v prefix"
return return
} }
p.major, v, ok = parseInt(v[1:]) p.major, v, ok = parseInt(v[1:])
if !ok { if !ok {
p.err = "bad major version"
return return
} }
if v == "" { if v == "" {
@ -187,13 +184,11 @@ func parse(v string) (p parsed, ok bool) {
return return
} }
if v[0] != '.' { if v[0] != '.' {
p.err = "bad minor prefix"
ok = false ok = false
return return
} }
p.minor, v, ok = parseInt(v[1:]) p.minor, v, ok = parseInt(v[1:])
if !ok { if !ok {
p.err = "bad minor version"
return return
} }
if v == "" { if v == "" {
@ -202,31 +197,26 @@ func parse(v string) (p parsed, ok bool) {
return return
} }
if v[0] != '.' { if v[0] != '.' {
p.err = "bad patch prefix"
ok = false ok = false
return return
} }
p.patch, v, ok = parseInt(v[1:]) p.patch, v, ok = parseInt(v[1:])
if !ok { if !ok {
p.err = "bad patch version"
return return
} }
if len(v) > 0 && v[0] == '-' { if len(v) > 0 && v[0] == '-' {
p.prerelease, v, ok = parsePrerelease(v) p.prerelease, v, ok = parsePrerelease(v)
if !ok { if !ok {
p.err = "bad prerelease"
return return
} }
} }
if len(v) > 0 && v[0] == '+' { if len(v) > 0 && v[0] == '+' {
p.build, v, ok = parseBuild(v) p.build, v, ok = parseBuild(v)
if !ok { if !ok {
p.err = "bad build"
return return
} }
} }
if v != "" { if v != "" {
p.err = "junk on end"
ok = false ok = false
return return
} }

4
vendor/modules.txt vendored
View File

@ -62,8 +62,8 @@ gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci
gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci/bytes gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci/bytes
gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci/mmio gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvpci/mmio
gitlab.com/nvidia/cloud-native/go-nvlib/pkg/pciids gitlab.com/nvidia/cloud-native/go-nvlib/pkg/pciids
# golang.org/x/mod v0.5.0 # golang.org/x/mod v0.15.0
## explicit; go 1.17 ## explicit; go 1.18
golang.org/x/mod/semver golang.org/x/mod/semver
# golang.org/x/sys v0.17.0 # golang.org/x/sys v0.17.0
## explicit; go 1.18 ## explicit; go 1.18