]> Cypherpunks repositories - gostls13.git/commit
bufio: Reader.Peek returns partial results on ErrBufferFull
authordjherbis <djherbis@gmail.com>
Fri, 29 Jan 2016 08:32:00 +0000 (00:32 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 4 Mar 2016 03:51:22 +0000 (03:51 +0000)
commit14bf9c8c07f82c4eac22a3e0f15da5cfbc30fe61
tree77423eee3c3f365db9bd26c5ff3bc1618ee8965c
parent7047742f125053438b81fb3c8d33e8ad462e981e
bufio: Reader.Peek returns partial results on ErrBufferFull

The existing implementation returns nil, ErrBufferFull when n > len(b.buf),
now it will return any data in the buffer and ErrBufferFull.

Fixes #14121

Change-Id: Ie52d32ccd80e4078ebfae6e75393c89675959ead
Reviewed-on: https://go-review.googlesource.com/19091
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/bufio/bufio.go
src/bufio/bufio_test.go