internal/lsp/cache: let Session.getGoEnv query GOWORK

This will make GOWORK value appear in the gopls log
when initializing the workspace. This CL does not include
GOWORK in `environmentVariables` (in view.go) (yet).

Change-Id: I16224d1ac50ac8209def008966371c6be858d05a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/385894
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
Hana 2022-02-15 10:37:52 -05:00 коммит произвёл Hyang-Ah Hana Kim
Родитель 9095d109eb
Коммит c6776771dd
1 изменённых файлов: 1 добавлений и 0 удалений

1
internal/lsp/cache/view.go поставляемый
Просмотреть файл

@ -936,6 +936,7 @@ func (s *Session) getGoEnv(ctx context.Context, folder string, goversion int, go
for k := range vars {
args = append(args, k)
}
args = append(args, "GOWORK")
inv := gocommand.Invocation{
Verb: "env",