Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/get: improve -insecure deprecation docs #41613

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions doc/go1.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ <h4 id="go-test"><code>go</code> <code>test</code></h4>

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

<h4 id="all-pattern">The <code>all</code> pattern</h4>
Expand Down
15 changes: 7 additions & 8 deletions src/cmd/go/alldocs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/cmd/go/internal/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ before resolving dependencies or building the code.
The -insecure flag permits fetching from repositories and resolving
custom domains using insecure schemes such as HTTP. Use with caution.
This flag is deprecated and will be removed in a future version of go.
The GOINSECURE environment variable is usually a better alternative, since
it provides control over which modules may be retrieved using an insecure
The GOINSECURE environment variable should be used instead, since it
provides control over which packages may be retrieved using an insecure
scheme. See 'go help environment' for details.

The -t flag instructs get to also download the packages required to build
Expand Down
11 changes: 5 additions & 6 deletions src/cmd/go/internal/modget/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,12 @@ require downgrading other dependencies, and 'go get' does
this automatically as well.

The -insecure flag permits fetching from repositories and resolving
custom domains using insecure schemes such as HTTP. Use with caution.
custom domains using insecure schemes such as HTTP, and also bypassess
module sum validation using the checksum database. Use with caution.
This flag is deprecated and will be removed in a future version of go.
The GOINSECURE environment variable is usually a better alternative, since
it provides control over which modules may be retrieved using an insecure
scheme. It should be noted that the -insecure flag also turns the module
checksum validation off. GOINSECURE does not do that, use GONOSUMDB.
See 'go help environment' for details.
To permit the use of insecure schemes, use the GOINSECURE environment
variable instead. To bypass module sum validation, use GOPRIVATE or
GONOSUMDB. See 'go help environment' for details.

The second step is to download (if needed), build, and install
the named packages.
Expand Down