Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bufio: Reader.Peek should return partial result on ErrBufferFull #14121

Closed
niemeyer opened this issue Jan 27, 2016 · 1 comment
Closed

bufio: Reader.Peek should return partial result on ErrBufferFull #14121

niemeyer opened this issue Jan 27, 2016 · 1 comment
Milestone

Comments

@niemeyer
Copy link
Contributor

The documentation of Reader.Peek gives the impression that it'll return the available data on errors, and in most cases it does. But when returning ErrBufferFull, which is a clear indication that there is data to return, it may actually return data or not depending on which path returns the error. It should consistently return the available data instead.

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Jan 27, 2016
@gopherbot
Copy link

CL https://golang.org/cl/19091 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants