design/draft-gobuild: flag //go:build-only files in Go 1.N go vet
Suggested by thepudds. Thanks!
Change-Id: I4b45a04f04989ca28937deaddfea50a3e5514e4b
Reviewed-on: https://go-review.googlesource.com/c/proposal/+/240837
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/design/draft-gobuild.md b/design/draft-gobuild.md
index e1b2e09..03c6d63 100644
--- a/design/draft-gobuild.md
+++ b/design/draft-gobuild.md
@@ -409,6 +409,12 @@
It will fail when a Go source file contains
`//go:build` and `// +build` lines with different meanings.
If the check fails, one can run `gofmt` `-w`.
+ - The `buildtags` check will also fail when a Go source file contains
+ `//go:build` without `// +build` and its containing module
+ has a `go` line listing a version before Go 1.N.
+ If the check fails, one can add any `// +build` line and then run `gofmt` `-w`,
+ which will replace it with the correct ones.
+ Or one can bump the `go.mod` go version to Go 1.N.
- Release notes will explain `//go:build` and the transition.
At this point: