Skip to content

Commit b3399ac

Browse files
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: Bryan C. Mills <bcmills@google.com>
1 parent 44c9354 commit b3399ac

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/cmd/go/alldocs.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/modload/help.go

+7
Original file line numberDiff line numberDiff line change
@@ -464,5 +464,12 @@ Because the module graph defines the meaning of import statements, any
464464
commands that load packages also use and therefore update go.mod,
465465
including go build, go get, go install, go list, go test, go mod graph,
466466
go mod tidy, and go mod why.
467+
468+
The expected language version, set by the go directive, determines
469+
which language features are available when compiling the module.
470+
Language features available in that version will be available for use.
471+
Language features removed in earlier versions, or added in later versions,
472+
will not be available. Note that the language version does not affect
473+
build tags, which are determined by the Go release being used.
467474
`,
468475
}

0 commit comments

Comments
 (0)