Skip to content

Commit 1fb149f

Browse files
witchardBryan C. Mills
authored and
Bryan C. Mills
committed
cmd/go/internal/get: improve -insecure deprecation docs
Updates #37519 Change-Id: I212607f1839b729d7da24b1258e56997b13ad830 GitHub-Last-Rev: db6d3c8 GitHub-Pull-Request: #41613 Reviewed-on: https://go-review.googlesource.com/c/go/+/257157 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Jay Conrod <[email protected]> Trust: Bryan C. Mills <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
1 parent ab2a5b4 commit 1fb149f

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

doc/go1.16.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,13 @@ <h4 id="go-test"><code>go</code> <code>test</code></h4>
9090

9191
<p><!-- golang.org/issue/37519 -->
9292
The <code>go</code> <code>get</code> <code>-insecure</code> flag is
93-
deprecated and will be removed in a future version. The <code>GOINSECURE</code>
94-
environment variable should be used instead, since it provides control
95-
over which modules may be retrieved using an insecure scheme. Unlike the
96-
<code>-insecure</code> flag, <code>GOINSECURE</code> does not disable module
97-
sum validation using the checksum database. The <code>GOPRIVATE</code> or
98-
<code>GONOSUMDB</code> environment variables may be used instead.
93+
deprecated and will be removed in a future version. This flag permits
94+
fetching from repositories and resolving custom domains using insecure
95+
schemes such as HTTP, and also bypassess module sum validation using the
96+
checksum database. To permit the use of insecure schemes, use the
97+
<code>GOINSECURE</code> environment variable instead. To bypass module
98+
sum validation, use <code>GOPRIVATE</code> or <code>GONOSUMDB</code>.
99+
See <code>go</code> <code>help</code> <code>environment</code> for details.
99100
</p>
100101

101102
<h4 id="all-pattern">The <code>all</code> pattern</h4>

src/cmd/go/alldocs.go

Lines changed: 7 additions & 8 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 packages 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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ require downgrading other dependencies, and 'go get' does
115115
this automatically as well.
116116
117117
The -insecure flag permits fetching from repositories and resolving
118-
custom domains using insecure schemes such as HTTP. Use with caution.
118+
custom domains using insecure schemes such as HTTP, and also bypassess
119+
module sum validation using the checksum database. Use with caution.
119120
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.
121+
To permit the use of insecure schemes, use the GOINSECURE environment
122+
variable instead. To bypass module sum validation, use GOPRIVATE or
123+
GONOSUMDB. See 'go help environment' for details.
125124
126125
The second step is to download (if needed), build, and install
127126
the named packages.

0 commit comments

Comments
 (0)