Skip to content

Commit 16f0896

Browse files
committed
cmd/go/internal/modget: Improve GOINSECURE docs.
Recommend use of GOINSECURE over -insecure flang and clarify that GOINSECURE environment variable does not also imply GONOSUMDB.
1 parent 4974ac6 commit 16f0896

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/cmd/go/alldocs.go

+10-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/help/helpdoc.go

+2
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ General-purpose environment variables:
510510
Comma-separated list of glob patterns (in the syntax of Go's path.Match)
511511
of module path prefixes that should always be fetched in an insecure
512512
manner. Only applies to dependencies that are being fetched directly.
513+
Unlike the -insecure flag on 'go get' this does not disable checksum
514+
database validation; please use GOPRIVATE or GONOSUMDB to achieve that.
513515
GOOS
514516
The operating system for which to compile code.
515517
Examples are linux, darwin, windows, netbsd.

src/cmd/go/internal/modget/get.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ require downgrading other dependencies, and 'go get' does
114114
this automatically as well.
115115
116116
The -insecure flag permits fetching from repositories and resolving
117-
custom domains using insecure schemes such as HTTP. Use with caution.
117+
custom domains using insecure schemes such as HTTP. Use with caution. It is
118+
recommended to use the GOINSECURE environment variable instead as it allows
119+
for more fine-grained control when fetching dependencies in this manner. See
120+
'go help environment' for details.
118121
119122
The second step is to download (if needed), build, and install
120123
the named packages.

0 commit comments

Comments
 (0)