From: Sean Liao Date: Sat, 1 Feb 2025 16:42:22 +0000 (+0000) Subject: text/scanner: add required ScanComments in example X-Git-Tag: go1.25rc1~1195 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3caf5bd09e84f77cc5e0394819d57a1beca87fcb;p=gostls13.git text/scanner: add required ScanComments in example Fixes #71133 Change-Id: I11f792bf4cb275e7bc3585cd92a4b327a3b6e368 Reviewed-on: https://go-review.googlesource.com/c/go/+/646036 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui --- diff --git a/src/text/scanner/scanner.go b/src/text/scanner/scanner.go index 6ae7a9b987..316fb4380f 100644 --- a/src/text/scanner/scanner.go +++ b/src/text/scanner/scanner.go @@ -50,7 +50,7 @@ func (pos Position) String() string { // to configure a [Scanner] such that it only recognizes (Go) identifiers, // integers, and skips comments, set the Scanner's Mode field to: // -// ScanIdents | ScanInts | SkipComments +// ScanIdents | ScanInts | ScanComments | SkipComments // // With the exceptions of comments, which are skipped if SkipComments is // set, unrecognized tokens are not ignored. Instead, the scanner simply