HomeFreeBSD

Ensure go modules cannot fetch missing modules via network

Description

Ensure go modules cannot fetch missing modules via network

Notes from go help modules:

If GOPROXY is set to the string "direct", downloads use a direct connection to
source control servers. Setting GOPROXY to "off" disallows downloading modules
from any source. Otherwise, GOPROXY is expected to be list of module proxy URLs
separated by either comma (,) or pipe (|) characters, which control error
fallback behavior. For each request, the go command tries each proxy in
sequence. If there is an error, the go command will try the next proxy in the
list if the error is a 404 or 410 HTTP response or if the current proxy is
followed by a pipe character, indicating it is safe to fall back on any error.

The GOPRIVATE and GONOPROXY environment variables allow bypassing
the proxy for selected modules. See 'go help module-private' for details.

No matter the source of the modules, the go command checks downloads against
known checksums, to detect unexpected changes in the content of any specific
module version from one day to the next. This check first consults the current
module's go.sum file but falls back to the Go checksum database, controlled by
the GOSUMDB and GONOSUMDB environment variables. See 'go help module-auth'
for details.

Reviewed by: dmgk
Sponsored by: SkunkWerks, GmbH
Differential Revision: https://reviews.freebsd.org/D26860

Details

Provenance
dchAuthored on
Reviewer
dmgk
Differential Revision
D26860: ports: ensure go-build doesn't try to access internet
Parents
rP554935: - Update to 3.1
Branches
Unknown
Tags
Unknown