Skip to content

Commit 7a2c9b4

Browse files
committed
cmd/go/internal/get: improve -insecure deprecation docs
Updates #37519
1 parent 0f55d37 commit 7a2c9b4

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

src/cmd/go/alldocs.go

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ before resolving dependencies or building the code.
4646
The -insecure flag permits fetching from repositories and resolving
4747
custom domains using insecure schemes such as HTTP. Use with caution.
4848
This flag is deprecated and will be removed in a future version of go.
49-
The GOINSECURE environment variable is usually a better alternative, since
50-
it provides control over which modules may be retrieved using an insecure
49+
The GOINSECURE environment variable should be used instead, since it
50+
provides control over which modules may be retrieved using an insecure
5151
scheme. See 'go help environment' for details.
5252
5353
The -t flag instructs get to also download the packages required to build

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ this automatically as well.
117117
The -insecure flag permits fetching from repositories and resolving
118118
custom domains using insecure schemes such as HTTP. Use with caution.
119119
This flag is deprecated and will be removed in a future version of go.
120-
The GOINSECURE environment variable is usually a better alternative, since
121-
it provides control over which modules may be retrieved using an insecure
122-
scheme. It should be noted that the -insecure flag also turns the module
123-
checksum validation off. GOINSECURE does not do that, use GONOSUMDB.
124-
See 'go help environment' for details.
120+
The GOINSECURE environment variable should be used instead, since it
121+
provides control over which modules may be retrieved using an insecure
122+
scheme. Unlike the -insecure flag, GOINSECURE does not disable module
123+
sum validation using the checksum database. The GOPRIVATE or GONOSUMDB
124+
environment variable may be used instead. See 'go help environment'
125+
for details.
125126
126127
The second step is to download (if needed), build, and install
127128
the named packages.

0 commit comments

Comments
 (0)