From df35ade067f22ef1f3aad3c2f3576997ff9646b4 Mon Sep 17 00:00:00 2001
From: Heschi Kreinick 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.
+
+
//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.
signal.Notify
on unbuffered channels
+ 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.
+