From 8870c05b60d80c0f1f984ac365eff3fd8f95982a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 30 May 2023 15:15:43 -0700 Subject: [PATCH] doc/go1.21: mention directive handling in go/{ast,build} For #56986 For #59033 Change-Id: I7d03fe34d418aff97a551b236b5d43506e402871 Reviewed-on: https://go-review.googlesource.com/c/go/+/499415 TryBot-Bypass: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Bryan Mills Auto-Submit: Ian Lance Taylor --- doc/go1.21.html | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) 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.

go/build
-

- 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.

go/build/constraint
-

- 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.

-- 2.44.0