cmd/go/internal/modfetch: move Import and Query to ../modload

Import and Query are about the set of modules viewed
through the modifying lens of the exclude and replace
directives in go.mod. Since package modload is what
manages go.mod, move them there.

Query's 'allowed' argument was meant to capture the
go.mod influence, but it fails to capture replacements,
and at that point we might as well move it where it belongs.

Import is currently ignorant of module replacements
but needs to take them into account.

This CL only moves the code and test. It does not make semantic changes.

Change-Id: I7adde3b0e6076f8ce5719e86c1f771d8dcb4b572
Reviewed-on: https://go-review.googlesource.com/122880
Reviewed-by: Bryan C. Mills <bcmills@google.com>
11 files changed
tree: da8ff4c6d50474231526688770d0d05e9ea09aa4
  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.