cmd/go/internal/modfetch: clean up Query

Clean up module query notation to make it easier to explain.

Apply a suggestion from Bryan in the previous CL to apply
the preference for releases (not pre-releases) to all queries,
not just "latest".

Change "v1" to mean "the latest v1.x.x" not "v1.0.0".
Change "v1.2" to mean "the latest v1.2.x" not "v1.2.0".
There was a TODO about checking for a tag/branch named v1,
but using the latest tagged v1.x.x release seems better than
taking the last commit (possibly untagged) from a branch
anyway.

Add <= and >= operators instead of misintepreting them
as < and > with malformed semantic versions.

Given that "v1" and "v1.2" now essentially address a wide range
of values, disallow ambiguous <=v1, <=v1.2, >v1, and >v1.2.

Add test.

Change-Id: I97a39c5a468ee710a19b587c46d1821f03d76acd
Reviewed-on: https://go-review.googlesource.com/122257
Reviewed-by: Bryan C. Mills <bcmills@google.com>
5 files changed
tree: 30971950c1fd93894fa71536676faddc4f50c77b
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. PATENTS
  6. README.md
  7. codereview.cfg
  8. main.go
  9. vendor/
README.md

Versioned Go Prototype (vgo)

This repository holds a prototype of what the go command might look like with integrated support for package versioning.

See research.swtch.com/vgo for documents about the design.

Download/Install

Use go get -u golang.org/x/vgo.

You can also manually git clone the repository to $GOPATH/src/golang.org/x/vgo.

Report Issues / Send Patches

See CONTRIBUTING.md.

This is still a very early prototype. You are likely to run into bugs. Please file bugs in the main Go issue tracker, golang.org/issue, and put the prefix x/vgo: in the issue title.

Thank you.