]> Cypherpunks repositories - gostls13.git/commit
cmd/go: disable workspace mode in GOPATH mode
authorBryan C. Mills <bcmills@google.com>
Mon, 27 Feb 2023 22:13:16 +0000 (22:13 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 28 Feb 2023 18:50:18 +0000 (18:50 +0000)
commitaf758177c06f24c870bb0b07c3f23da4943f12cf
treefa4e28c189ca3c31cff40e382b6e519dd6617cf0
parent89c3f7c119cc3909104abaa55a6438d7b54d4a42
cmd/go: disable workspace mode in GOPATH mode

Workspace mode is specifically for working with modules;
it doesn't make sense in GOPATH mode.

This also fixes a panic in (*modload.MainModuleSet).GoVersion
when go.work is present in GOPATH mode.

For #58767.

Change-Id: Ic6924352afb486fecc18e009e6b517f078e81094
Reviewed-on: https://go-review.googlesource.com/c/go/+/471600
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/work_empty_panic_GOPATH.txt [new file with mode: 0644]