]> Cypherpunks repositories - gostls13.git/commit
bufio: make the description of Peek's behavior better
authorPetr Osetrov <paradoxfilm2013@gmail.com>
Fri, 6 Dec 2024 21:51:36 +0000 (21:51 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 9 Dec 2024 16:30:42 +0000 (16:30 +0000)
commite3e1d735287a3bab5b060415513bd64785c4e209
tree02a66bcf970a281e86a1928a745b9e4e39a4a004
parente79b2e1e3acbce03b04f4ae95a8884183006bd1e
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: 9d48f8ac81f46d5b8f4a1885af28cbccd1747c3b
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>
src/bufio/bufio.go