semver: add ByVersion and Sort for sorting semantic version lists

For golang/go#44969

Change-Id: I148a18b676061cd8ea481c3f5130d0792c0b5233
Reviewed-on: https://go-review.googlesource.com/c/mod/+/304151
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>
2 files changed
tree: db490f2430a9f0e8278edefbe9f1525ec126527b
  1. LICENSE
  2. PATENTS
  3. README.md
  4. codereview.cfg
  5. go.mod
  6. go.sum
  7. gosumcheck/
  8. internal/
  9. modfile/
  10. module/
  11. semver/
  12. sumdb/
  13. zip/
README.md

mod

PkgGoDev

This repository holds packages for writing tools that work directly with Go module mechanics. That is, it is for direct manipulation of Go modules themselves.

It is NOT about supporting general development tools that need to do things like load packages in module mode. That use case, where modules are incidental rather than the focus, should remain in x/tools, specifically x/tools/go/packages.

The specific case of loading packages should still be done by invoking the go command, which remains the single point of truth for package loading algorithms.