]> Cypherpunks repositories - gostls13.git/commit
cmd/go: replace -getmode with -mod, $GOPROXY
authorRuss Cox <rsc@golang.org>
Sun, 29 Jul 2018 05:38:25 +0000 (01:38 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 1 Aug 2018 00:35:22 +0000 (00:35 +0000)
commit30a84b389daf8f6c358f92da056ac19280e3640d
treef1020a3cbffa5d95ba37caba91f5add584f5d3b2
parentc1a4fc3b36ccfe0022392224c2630f7971c156fe
cmd/go: replace -getmode with -mod, $GOPROXY

The old -getmode flag had two settings:
-getmode=local meant don't download from the network.
-getmode=vendor meant only use the vendor directory.

The new -mod flag has two settings:
-mod=readonly means refuse to automatically update go.mod (mainly for CI testing).
-mod=vendor means only use the vendor directory.

The old GOPROXY variable had two settings:
a proxy URL or else the empty string (direct connect).

The new GOPROXY variable has three settings:
a proxy URL, the string "off" (no network use allowed),
or else the empty string or the explicit string "direct" (direct connection).
We anticipate allow a comma-separated sequence in a future release,
so commas are disallowed entirely right now.

Fixes #24666.
Fixes #26586.
Fixes #26370.
Fixes #26361.

Change-Id: If2601a16b09f04800f666938c071fc053b4c3f9c
Reviewed-on: https://go-review.googlesource.com/126696
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
16 files changed:
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/modfetch/proxy.go
src/cmd/go/internal/modfetch/repo.go
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/build.go
src/cmd/go/internal/modload/help.go
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/vet/vetflag.go
src/cmd/go/internal/work/build.go
src/cmd/go/internal/work/init.go
src/cmd/go/testdata/script/mod_file_proxy.txt
src/cmd/go/testdata/script/mod_getmode_vendor.txt
src/cmd/go/testdata/script/mod_readonly.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_vendor.txt