go/src/bufio
Petr Osetrov e3e1d73528 bufio: make the description of Peek's behavior better
Previously, based on the description, it was not obvious that Peek could
change the buffer. It may have been mistakenly assumed that Peek would
always return an error if n is greater than b.Buffered().

Change-Id: I095006dd2ba1c2138bb193396cb24e2dda42d771
GitHub-Last-Rev: 9d48f8ac81
GitHub-Pull-Request: golang/go#70712
Reviewed-on: https://go-review.googlesource.com/c/go/+/634175
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
2024-12-09 16:30:42 +00:00
..
bufio.go bufio: make the description of Peek's behavior better 2024-12-09 16:30:42 +00:00
bufio_test.go bufio: add example for ReadFrom and remove unused code 2024-11-01 21:52:12 +00:00
example_test.go bufio: add example for ReadFrom and remove unused code 2024-11-01 21:52:12 +00:00
export_test.go
scan.go bufio: allow terminating Scanner early cleanly without a final token or an error 2023-10-23 09:06:30 +00:00
scan_test.go all: clean unnecessary casts for test files 2023-09-22 16:22:42 +00:00