diff --git a/doc/go1.17.html b/doc/go1.17.html index 2a56b6d270..6c53aaaa88 100644 --- a/doc/go1.17.html +++ b/doc/go1.17.html @@ -279,12 +279,41 @@ Do not send CLs removing the interior tags from such phrases. mod download all.

+

//go:build lines

+ +

+ The go command now understands //go:build lines + and prefers them over // +build lines. The new syntax uses + boolean expressions, just like Go, and should be less error-prone. + As of this release, the new syntax is fully supported, and all Go files + should be updated to have both forms with the same meaning. To aid in + migration, gofmt now automatically + synchronizes the two forms. For more details on the syntax and migration plan, + see + https://golang.org/design/draft-gobuild. +

+ +

gofmt

+ gofmt (and go fmt) now synchronizes + //go:build lines with // +build lines. If a file + only has // +build lines, they will be moved to the appropriate + location in the file, and matching //go:build lines will be + added. Otherwise, // +build lines will be overwritten based on + any existing //go:build lines. For more information, see + https://golang.org/design/draft-gobuild. + +

Vet

-

New warning within buildtags

+

New warning for mismatched //go:build and // +build lines

- TODO(rsc): Describe changes to buildtags https://golang.org/cl/240609 + The vet tool now verifies that //go:build and + // +build lines are in the correct part of the file and + synchronized with each other. If they aren't, + gofmt can be used to fix them. For more + information, see + https://golang.org/design/draft-gobuild.

New warning for calling signal.Notify on unbuffered channels

@@ -638,6 +667,22 @@ func Foo() bool { +
go/format
+
+

+ The Source and + Node functions now + synchronize //go:build lines with // +build + lines. If a file only has // +build lines, they will be + moved to the appropriate location in the file, and matching + //go:build lines will be added. Otherwise, + // +build lines will be overwritten based on any existing + //go:build lines. For more information, see + https://golang.org/design/draft-gobuild. +

+
+
+
io/fs