Fixes #73778
Change-Id: If6d87a92786c9b0ee2bd790b57937919afe0fc5c
GitHub-Last-Rev:
4b4c7595d5779a127b01a5d71adca91cb5aa6c05
GitHub-Pull-Request: golang/go#73804
Reviewed-on: https://go-review.googlesource.com/c/go/+/674695
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
}
}
-// Buffer sets the initial buffer to use when scanning
+// Buffer controls memory allocation by the Scanner.
+// It sets the initial buffer to use when scanning
// and the maximum size of buffer that may be allocated during scanning.
+// The contents of the buffer are ignored.
+//
// The maximum token size must be less than the larger of max and cap(buf).
// If max <= cap(buf), [Scanner.Scan] will use this buffer only and do no allocation.
//