-
Rob Pike authored
Add Scanner.Buffer, which lets the user give a buffer to the scanner and set the maximum token size. We call it Buffer not SetBuffer for consistency with Split, which perhaps should have been called SetSplit; too late regardless. Both Buffer and Split panic if they are called after Scan. The panic in Split is new, but the comment on the method already said it needed to be called first, so we might as well add the verification while we're doing it for Buffer. This method allows precise user control of storage. Fixes #11702. Change-Id: I80e3d0e3830562fdabd4f7b08f322e1378248c39 Reviewed-on: https://go-review.googlesource.com/14599Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: roger peppe <rogpeppe@gmail.com>
13be616e
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bufio.go | ||
bufio_test.go | ||
example_test.go | ||
export_test.go | ||
scan.go | ||
scan_test.go |