mirror of https://github.com/golang/go.git
Previously, gopls would fall back on a gopath resolver when running goimports from a directory containing go.work (but not go.mod). Fix this by update the code to recognize that GOWORK also puts goimports into module mode. All the work to _support_ go.work had already been done, but the tests were only passing because they were setting GO111MODULE=on explicitly (and therefore GOMOD=/dev/null was satisfying the pre-existing check). Also add a test for the regression in gopls. Fixes golang/go#52784 Change-Id: I31df6f71a949a5668e8dc001b3ee25ad26f2f927 Reviewed-on: https://go-review.googlesource.com/c/tools/+/413689 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> |
||
|---|---|---|
| .. | ||
| call_hierarchy_test.go | ||
| configuration_test.go | ||
| debugserver_test.go | ||
| definition_test.go | ||
| embed_test.go | ||
| failures_test.go | ||
| fix_test.go | ||
| formatting_test.go | ||
| generate_test.go | ||
| highlight_test.go | ||
| hover_test.go | ||
| import_test.go | ||
| imports_test.go | ||
| link_test.go | ||
| misc_test.go | ||
| multiple_adhoc_test.go | ||
| references_test.go | ||
| rename_test.go | ||
| semantictokens_test.go | ||
| settings_test.go | ||
| shared_test.go | ||
| staticcheck_test.go | ||
| vendor_test.go | ||
| vuln_test.go | ||
| workspace_symbol_test.go | ||