This information is in the release notes. Go 1.17 Release Notes https://go.dev/doc/go1.17
//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. Go 1.18 Release Notes https://go.dev/doc/go1.18 //go:build lines Go 1.17 introduced //go:build lines as a more readable way to write build constraints, instead of // +build lines. As of Go 1.17, gofmt adds //go:build lines to match existing +build lines and keeps them in sync, while go vet diagnoses when they are out of sync. Since the release of Go 1.18 marks the end of support for Go 1.16, all supported versions of Go now understand //go:build lines. In Go 1.18, go fix now removes the now-obsolete // +build lines in modules declaring go 1.18 or later in their go.mod files. For more information, see https://go.dev/design/draft-gobuild. Peter On Wednesday, June 15, 2022 at 10:37:16 PM UTC-4 cuiw...@gmail.com wrote: > about when these feature add to golang? > and is all we can do with //go:build can do with //+build, and vice versa? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/642fcba9-8d2d-4323-823b-71d537f98b0an%40googlegroups.com.