mirror of https://github.com/golang/go.git
This CL does not fix failures in ./gopls/internal/regtest, which will be fixed separately. In refactor/rename.TestDiff, add a go.mod file. In internal/imports.ProcessEnv.buildContext, set an I/O hook if GO111MODULE=off in ProcessEnv but not in the current process's environment. Context allows the user to set GOPATH, GOOS, GOARCH, and a few other environment variables, but not GO111MODULE. Context.Import may return different results than packages.Load if the latter is invoked with a GO111MODULE value that differs from the caller's environment. Setting an I/O hook forces Import to run in GOPATH mode, not invoking 'go list'. This is undocumented, but it should be stable while GOPATH is supported. For golang/go#41330 Change-Id: I5679e8941e32dc95b05c234cb2e3fec5cabebced Reviewed-on: https://go-review.googlesource.com/c/tools/+/255398 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Jay Conrod <jayconrod@google.com> |
||
|---|---|---|
| .. | ||
| eg | ||
| importgraph | ||
| rename | ||
| satisfy | ||
| README | ||
README
golang.org/x/tools/refactor: libraries for refactoring tools.