mirror of
https://github.com/golang/go
synced 2024-11-23 04:40:09 -07:00
cmd/go: migrate away from semver.Max
For #32700 Change-Id: Ib5cd7004e4558bebebc5f9e7c9263d720c590845 Reviewed-on: https://go-review.googlesource.com/c/go/+/269338 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
9ef65ff137
commit
e75aef80ca
@ -483,7 +483,7 @@ func readDiskStatByHash(path, rev string) (file string, info *RevInfo, err error
|
||||
for _, name := range names {
|
||||
if strings.HasSuffix(name, suffix) {
|
||||
v := strings.TrimSuffix(name, ".info")
|
||||
if IsPseudoVersion(v) && semver.Max(maxVersion, v) == v {
|
||||
if IsPseudoVersion(v) && semver.Compare(v, maxVersion) > 0 {
|
||||
maxVersion = v
|
||||
file, info, err = readDiskStat(path, strings.TrimSuffix(name, ".info"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user