diff --git a/_content/css/styles.css b/_content/css/styles.css index 11dfb5d266..ef49857bb8 100644 --- a/_content/css/styles.css +++ b/_content/css/styles.css @@ -5378,3 +5378,27 @@ hr { border-top: 1px solid var(--color-border); height: 1px; } + +/* Table in mod topics. */ +.ModTable { + border-collapse: collapse; +} +.ModTable-row { + border-bottom: var(--border); + vertical-align: top; +} +.ModTable-head { + background: var(--color-background-accented); + border-bottom: var(--border); + border-top: var(--border); + height: 3rem; +} +.ModTable-head-cell { + white-space: nowrap; +} +.ModTable-cell { + padding: 0.4375rem 0.4375rem 0.875rem; +} +.ModTable-cell p { + margin: 0rem; +} diff --git a/_content/ref/mod.md b/_content/ref/mod.md index d222f72ed1..ce9c1c3be6 100644 --- a/_content/ref/mod.md +++ b/_content/ref/mod.md @@ -2594,14 +2594,14 @@ disabling module-aware mode. - - - + + + - - + - - - - + + - - - + + - - - + + - - - + + + - - + - @@ -2836,22 +2836,22 @@ both be stored on disk, since the former is encoded as `example.com/!m`.
CommandBehavior
CommandBehavior
+
go build
go doc
go fix
@@ -2613,49 +2613,49 @@ disabling module-aware mode. go test
go vet
+ Only packages in the standard library and packages specified as .go files on the command line can be loaded, imported, and built. Packages from other modules cannot be built, since there is no place to record module requirements and ensure deterministic builds.
go get +
go get Packages and executables may be built and installed as usual. Note that there is no main module when go get is run without a go.mod file, so replace and exclude directives are not applied.
go list -m +
go list -m Explicit version queries are required for most arguments, except when the -versions flag is used.
go mod download +
go mod download Explicit version queries are required for most arguments.
go mod editAn explicit file argument is required.
go mod editAn explicit file argument is required.
+
go mod graph
go mod tidy
go mod vendor
go mod verify
go mod why
+ These commands require a go.mod file and will report an error if one is not present.
- - - + + + - - - + + - - - + + - - - + + - - - + + - - - + +
PathDescription
PathDescription
$base/$module/@v/list +
$base/$module/@v/list Returns a list of known versions of the given module in plain text, one per line. This list should not include pseudo-versions.
$base/$module/@v/$version.info +
$base/$module/@v/$version.info

Returns JSON-formatted metadata about a specific version of a module. The response must be a JSON object that corresponds to the Go data @@ -2884,9 +2884,9 @@ type Info struct {

$base/$module/@v/$version.mod +
$base/$module/@v/$version.mod Returns the go.mod file for a specific version of a module. If the module does not have a go.mod file at the requested version, a file containing only a module @@ -2894,17 +2894,17 @@ type Info struct { the original, unmodified go.mod file must be returned.
$base/$module/@v/$version.zip +
$base/$module/@v/$version.zip Returns a zip file containing the contents of a specific version of a module. See Module zip files for details on how this zip file must be formatted.
$base/$module/@latest +
$base/$module/@latest Returns JSON-formatted metadata about the latest known version of a module in the same format as $base/$module/@v/$version.info. The latest version should @@ -3165,43 +3165,43 @@ if the module path is matched by the `GOINSECURE` environment variable. - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +
NameCommandGOVCS defaultSecure schemes
NameCommandGOVCS defaultSecure schemes
BazaarbzrPrivate onlyhttps, bzr+ssh
BazaarbzrPrivate onlyhttps, bzr+ssh
FossilfossilPrivate onlyhttps
FossilfossilPrivate onlyhttps
GitgitPublic and privatehttps, git+ssh, ssh
GitgitPublic and privatehttps, git+ssh, ssh
MercurialhgPublic and privatehttps, ssh
MercurialhgPublic and privatehttps, ssh
SubversionsvnPrivate onlyhttps, svn+ssh
SubversionsvnPrivate onlyhttps, svn+ssh
@@ -3901,24 +3901,24 @@ conflicts on case-insensitive file systems. - - - + + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + +
PathDescription
PathDescription
$module@$version/ +
$module@$version/ Directory containing extracted contents of a module .zip file. This serves as a module root directory for a downloaded module. It won't contain a go.mod file if the original module didn't have one.
cache/download/ +
cache/download/ Directory containing files downloaded from module proxies and files derived from version control systems. The layout of this directory follows the @@ -3927,44 +3927,44 @@ conflicts on case-insensitive file systems. server or when referenced with a file:// URL.
cache/download/$module/@v/list +
cache/download/$module/@v/list List of known versions (see GOPROXY protocol). This may change over time, so the go command usually fetches a new copy instead of re-using this file.
cache/download/$module/@v/$version.info +
cache/download/$module/@v/$version.info JSON metadata about the version. (see GOPROXY protocol). This may change over time, so the go command usually fetches a new copy instead of re-using this file.
cache/download/$module/@v/$version.mod +
cache/download/$module/@v/$version.mod The go.mod file for this version (see GOPROXY protocol). If the original module did not have a go.mod file, this is a synthesized file with no requirements.
cache/download/$module/@v/$version.zip +
cache/download/$module/@v/$version.zip The zipped contents of the module (see GOPROXY protocol and Module zip files).
cache/download/$module/@v/$version.ziphash +
cache/download/$module/@v/$version.ziphash A cryptographic hash of the files in the .zip file. Note that the .zip file itself is not hashed, so file order, compression, alignment, and metadata don't affect the hash. @@ -3976,17 +3976,17 @@ conflicts on case-insensitive file systems. directories match these files.
cache/download/sumdb/ +
cache/download/sumdb/ Directory containing files downloaded from a checksum database (typically sum.golang.org).
cache/vcs/ +
cache/vcs/ Contains cloned version control repositories for modules fetched directly from their sources. Directory names are hex-encoded hashes derived from the repository type and URL. Repositories are optimized @@ -4111,15 +4111,15 @@ values. - - - + + + - - - + + - - - - + + - - - - + + - - - - + + -
PathDescription
PathDescription
$base/latest +
$base/latest Returns a signed, encoded tree description for the latest log. This signed description is in the form of a note, @@ -4131,10 +4131,9 @@ values. golang.org/x/mod/sumdb/tlog#FormatTree.
$base/lookup/$module@$version +
$base/lookup/$module@$version Returns the log record number for the entry about $module at $version, followed by the data for the record (that is, the go.sum lines for $module at @@ -4142,10 +4141,9 @@ values. contains the record.
$base/tile/$H/$L/$K[.p/$W] +
$base/tile/$H/$L/$K[.p/$W] Returns a [log tile](https://research.swtch.com/tlog#serving_tiles), which is a set of hashes that make up a section of the log. Each tile is defined in a two-dimensional coordinate at tile level @@ -4155,16 +4153,14 @@ values. back to fetching the full tile if a partial tile is not found.
$base/tile/$H/data/$K[.p/$W] +
$base/tile/$H/data/$K[.p/$W] Returns the record data for the leaf hashes in /tile/$H/0/$K[.p/$W] (with a literal data path element).
@@ -4230,15 +4226,15 @@ of all environment variables recognized by the `go` command. - - - + + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + +
VariableDescription
VariableDescription
GO111MODULE +
GO111MODULE

Controls whether the go command runs in module-aware mode or GOPATH mode. Three values are recognized: @@ -4265,9 +4261,9 @@ of all environment variables recognized by the `go` command.

GOMODCACHE +
GOMODCACHE

The directory where the go command will store downloaded modules and related files. See Module @@ -4279,9 +4275,9 @@ of all environment variables recognized by the `go` command.

GOINSECURE +
GOINSECURE

Comma-separated list of glob patterns (in the syntax of Go's path.Match) of module path @@ -4296,9 +4292,9 @@ of all environment variables recognized by the `go` command.

GONOPROXY +
GONOPROXY

Comma-separated list of glob patterns (in the syntax of Go's path.Match) of module path @@ -4312,9 +4308,9 @@ of all environment variables recognized by the `go` command.

GONOSUMDB +
GONOSUMDB

Comma-separated list of glob patterns (in the syntax of Go's path.Match) of module path @@ -4328,9 +4324,9 @@ of all environment variables recognized by the `go` command.

GOPATH +
GOPATH

In GOPATH mode, the GOPATH variable is a list of directories that may contain Go code. @@ -4347,9 +4343,9 @@ of all environment variables recognized by the `go` command.

GOPRIVATE +
GOPRIVATE Comma-separated list of glob patterns (in the syntax of Go's path.Match) of module path prefixes that should be considered private. GOPRIVATE @@ -4360,9 +4356,9 @@ of all environment variables recognized by the `go` command. GOVCS.
GOPROXY +
GOPROXY

List of module proxy URLs, separated by commas (,) or pipes (|). When the go command looks up @@ -4417,9 +4413,9 @@ of all environment variables recognized by the `go` command.

GOSUMDB +
GOSUMDB

Identifies the name of the checksum database to use and optionally its public key and URL. For example: @@ -4459,9 +4455,9 @@ GOSUMDB="sum.golang.org+<publickey> https://sum.golang.org"

GOVCS +
GOVCS

Controls the set of version control tools the go command may use to download public and private modules (defined by whether @@ -4482,9 +4478,9 @@ GOSUMDB="sum.golang.org+<publickey> https://sum.golang.org"

GOWORK +
GOWORK

The `GOWORK` environment variable instructs the `go` command to enter workspace mode using the provided [`go.work` file](#go-work-file) to define the workspace.