Commit b3399ac5 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/go: add more docs for go directive in go.mod file

Updates #30791

Change-Id: I67efd7fd3b3a550428b16518bb27a3d81c178d28
Reviewed-on: https://go-review.googlesource.com/c/go/+/181840
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 44c9354c
...@@ -1806,6 +1806,13 @@ ...@@ -1806,6 +1806,13 @@
// including go build, go get, go install, go list, go test, go mod graph, // including go build, go get, go install, go list, go test, go mod graph,
// go mod tidy, and go mod why. // go mod tidy, and go mod why.
// //
// The expected language version, set by the go directive, determines
// which language features are available when compiling the module.
// Language features available in that version will be available for use.
// Language features removed in earlier versions, or added in later versions,
// will not be available. Note that the language version does not affect
// build tags, which are determined by the Go release being used.
//
// //
// GOPATH environment variable // GOPATH environment variable
// //
......
...@@ -464,5 +464,12 @@ Because the module graph defines the meaning of import statements, any ...@@ -464,5 +464,12 @@ Because the module graph defines the meaning of import statements, any
commands that load packages also use and therefore update go.mod, commands that load packages also use and therefore update go.mod,
including go build, go get, go install, go list, go test, go mod graph, including go build, go get, go install, go list, go test, go mod graph,
go mod tidy, and go mod why. go mod tidy, and go mod why.
The expected language version, set by the go directive, determines
which language features are available when compiling the module.
Language features available in that version will be available for use.
Language features removed in earlier versions, or added in later versions,
will not be available. Note that the language version does not affect
build tags, which are determined by the Go release being used.
`, `,
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment