mirror of
https://github.com/golang/go.git
synced 2025-11-10 13:41:05 +00:00
cmd/go/internal/modload: delete unused *mvsReqs.next method
For #36460 Updates #36465 Change-Id: Id818dce21d39a48cf5fc9c015b30497dce9cd1ef Reviewed-on: https://go-review.googlesource.com/c/go/+/278596 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
665def2c11
commit
ba76567bc2
1 changed files with 0 additions and 16 deletions
|
|
@ -111,19 +111,3 @@ func (*mvsReqs) Previous(m module.Version) (module.Version, error) {
|
||||||
}
|
}
|
||||||
return module.Version{Path: m.Path, Version: "none"}, nil
|
return module.Version{Path: m.Path, Version: "none"}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// next returns the next version of m.Path after m.Version.
|
|
||||||
// It is only used by the exclusion processing in the Required method,
|
|
||||||
// not called directly by MVS.
|
|
||||||
func (*mvsReqs) next(m module.Version) (module.Version, error) {
|
|
||||||
// TODO(golang.org/issue/38714): thread tracing context through MVS.
|
|
||||||
list, err := versions(context.TODO(), m.Path, CheckAllowed)
|
|
||||||
if err != nil {
|
|
||||||
return module.Version{}, err
|
|
||||||
}
|
|
||||||
i := sort.Search(len(list), func(i int) bool { return semver.Compare(list[i], m.Version) > 0 })
|
|
||||||
if i < len(list) {
|
|
||||||
return module.Version{Path: m.Path, Version: list[i]}, nil
|
|
||||||
}
|
|
||||||
return module.Version{Path: m.Path, Version: "none"}, nil
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue