diff --git a/doc/go1.21.html b/doc/go1.21.html index 2f4b214a72..31157b0251 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -162,10 +162,6 @@ Do not send CLs removing the interior tags from such phrases. rather than just base names.
-- TODO: https://go.dev/cl/453603: cmd/go, go/build: parse directives in file headers; modified api/next/56986.txt -
-@@ -488,24 +484,39 @@ Do not send CLs removing the interior tags from such phrases.
- TODO: https://go.dev/cl/476276: go/ast: add File.GoVersion; modified api/next/59033.txt +
+ The new
+ File.GoVersion
+ field records the minimum Go version required by
+ any //go:build
or // +build
+ directives.
- TODO: https://go.dev/cl/453603: cmd/go, go/build: parse directives in file headers; modified api/next/56986.txt +
+ The package now parses build directives (comments that start
+ with //go:
) in file headers (before
+ the package
declaration). These directives are
+ available in the new
+ Package
fields
+ Directives
,
+ TestDirectives
,
+ and
+ XTestDirectives
.
- TODO: https://go.dev/cl/476275: go/build/constraint: add GoVersion; modified api/next/59033.txt +
+ The new
+ GoVersion
+ function returns the minimum Go version implied by a build
+ expression.