diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-10-02 10:51:09 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-10-04 15:47:46 +0000 |
commit | 6145a80608087b309251b4edf1a612739331bdee (patch) | |
tree | 21844265641515c86014f632674f797868e587d3 /src/cmd/go/internal/list/list.go | |
parent | c1e46af62f2893a6beb2341ef71ffe8d3787975b (diff) | |
download | go-6145a80608087b309251b4edf1a612739331bdee.tar.gz go-6145a80608087b309251b4edf1a612739331bdee.zip |
cmd/go: remove the -mod flag from 'go get'
'GOFLAGS=-mod=vendor' currently causes 'go get' to always fail unless
the '-mod' flag is explicitly overwritten. Moreover, as of CL 198319
we plan to set -mod=vendor by default if a vendor directory is
present, so all users with vendor directories will be affected — not
just those who set 'GOFLAGS' explicitly.
Similarly, an explicit '-mod=readonly' argument to 'go get' is
currently ignored as a special case, but the fact that it is ignored
(rather than rejected) can be very surprising.
Rather than adding more special cases, we should remove the '-mod'
flag from 'go get' entirely.
Fixes #30345
Fixes #32502
Updates #33848
Change-Id: Iecd3233ca3ef580ca3a66bd5e6ee8d86d4cbd8a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/198438
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/list/list.go')
-rw-r--r-- | src/cmd/go/internal/list/list.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go index a5f1abe64a..67819939e6 100644 --- a/src/cmd/go/internal/list/list.go +++ b/src/cmd/go/internal/list/list.go @@ -287,7 +287,7 @@ For more about modules, see 'go help modules'. func init() { CmdList.Run = runList // break init cycle - work.AddBuildFlags(CmdList) + work.AddBuildFlags(CmdList, work.DefaultBuildFlags) } var ( |