From 214ce28503c891e2c5c63150f240424f994d4e76 Mon Sep 17 00:00:00 2001 From: Quan Tong Date: Mon, 16 Oct 2023 15:39:48 +0700 Subject: [PATCH] cmd/go/internal/help: update the documentation to match the design and implementation The existing documentation imply that the build constraints should be ignored after a block comments, but actually it's not. Fixes #63502 Change-Id: I0597934b7a7eeab8908bf06e1312169b3702bf05 Reviewed-on: https://go-review.googlesource.com/c/go/+/535635 Reviewed-by: Michael Matloob LUCI-TryBot-Result: Go LUCI Reviewed-by: Bryan Mills Reviewed-by: Mark Pictor Auto-Submit: Bryan Mills Reviewed-by: Ian Lance Taylor --- src/cmd/go/alldocs.go | 2 +- src/cmd/go/internal/help/helpdoc.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 392a21148b..a5148ad486 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1926,7 +1926,7 @@ // // Constraints may appear in any kind of source file (not just Go), but // they must appear near the top of the file, preceded -// only by blank lines and other line comments. These rules mean that in Go +// only by blank lines and other comments. These rules mean that in Go // files a build constraint must appear before the package clause. // // To distinguish build constraints from package documentation, diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index 68ac4d229d..93613ac65e 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -829,7 +829,7 @@ line comment that begins Constraints may appear in any kind of source file (not just Go), but they must appear near the top of the file, preceded -only by blank lines and other line comments. These rules mean that in Go +only by blank lines and other comments. These rules mean that in Go files a build constraint must appear before the package clause. To distinguish build constraints from package documentation, -- 2.50.0