From: Bryan C. Mills Date: Mon, 24 Jun 2019 21:49:36 +0000 (-0400) Subject: doc/go1.13: describe new cmd/go environment variables X-Git-Tag: go1.13beta1~9 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=53a42d3c4a61d79415ceabc97ae77690cad79067;p=gostls13.git doc/go1.13: describe new cmd/go environment variables Change-Id: I99669339b816a3ae56bbe082a8c47ae17e763d71 Reviewed-on: https://go-review.googlesource.com/c/go/+/183632 Reviewed-by: Katie Hockman Reviewed-by: Jay Conrod --- diff --git a/doc/go1.13.html b/doc/go1.13.html index d48bf72c96..fb9ea42429 100644 --- a/doc/go1.13.html +++ b/doc/go1.13.html @@ -167,6 +167,63 @@ Do not send CLs removing the interior tags from such phrases.

Modules

+

Environment variables

+ +

+ The new + GOPRIVATE + environment variable indicates module paths that are not publicly available. + It contains a comma-separated list of glob patterns (in the syntax of + path.Match) to be matched against a + prefix of the module path. It serves as the default value for the + lower-level GONOPROXY and GONOSUMDB variables, which + provide finer-grained control over which modules are fetched via proxy and + verified using the checksum database. +

+ +

+ The GOPROXY + environment variable may now be set to a comma-separated list of proxy + URLs or the special token direct, and + its default value is + now https://proxy.golang.org,direct. When resolving a package + path to its containing module, the go command will try each + possible module path on the first proxy in the list before falling back to the + next. If an HTTPS proxy is unreachable or returns a status code other than 404 + or 410 for a given module path, no subsequent proxy is consulted for that + path. The direct token indicates that the go command + should attempt to fetch the module directly from its origin; + GOPROXY entries after direct are ignored. +

+ +

+ The new + GOSUMDB + environment variable identifies the name, and optionally the public key and + server URL, of the database to consult for checksums of modules that are not + yet listed in the main module's go.sum file. + If GOSUMDB does not include an explicit URL, the URL is chosen by + probing the GOPROXY URLs for an endpoint indicating support for + the checksum database, falling back to a direct connection to the named + database if it is not supported by any proxy. If GOSUMDB is set + to off, the checksum database is not consulted and only the + existing checksums in the go.sum file are verified. +

+ +

+ Users who cannot reach the default proxy and checksum database (for example, + due to a firewalled or sandboxed configuration) may disable their use by + setting GOPROXY to direct, and/or + GOSUMDB to off. + go env -w + can be used to set the default values for these variables independent of + platform: +

+
+go env -w GOPROXY=direct
+go env -w GOSUMDB=off
+
+

go get