]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add more docs for go directive in go.mod file
authorIan Lance Taylor <iant@golang.org>
Wed, 12 Jun 2019 14:01:04 +0000 (07:01 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 21 Jun 2019 14:08:21 +0000 (14:08 +0000)
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: Bryan C. Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/modload/help.go

index d2ce578564969d9e2be607f838d7d33b5031d368..40cbaa2331e38fd1d2608d71e6f80151bc65c1f8 100644 (file)
 // including go build, go get, go install, go list, go test, go mod graph,
 // 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
 //
index 9ce8dfb33b3c9b6a9eb8cb941f4116421cdc05c4..788544c2c85177ca10ff36240c1da424e22323ae 100644 (file)
@@ -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,
 including go build, go get, go install, go list, go test, go mod graph,
 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.
        `,
 }