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 <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Sean Liao 2025-02-01 16:42:22 +00:00 committed by Gopher Robot
parent 3a81ebea0d
commit 3caf5bd09e
1 changed files with 1 additions and 1 deletions

View File

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