We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The documentation for io.LimitedReader says:
A LimitedReader reads from R but limits the amount of data returned to just N bytes. Each call to Read updates N to reflect the new amount remaining.
It doesn't say anything about what happens when EOF is hit first in the underlying R and N > 0. Does it return EOF or ErrUnexpectedEOF?
Current behavior is to return EOF. We should document that.
The text was updated successfully, but these errors were encountered:
Well, ErrUnexpectedEOF wouldn't be the right error in any case. I think you mean EOF vs ErrUnexpectedDataNotEOFViolatingTruncatingYourData.
But yes, it's EOF, silently truncating your data at the desired location.
Feel free to send for 1.8 if you'd like, but don't re-milestone to 1.8.
Sorry, something went wrong.
8c190e5
No branches or pull requests
The documentation for io.LimitedReader says:
It doesn't say anything about what happens when EOF is hit first in the underlying R and N > 0. Does it return EOF or ErrUnexpectedEOF?
Current behavior is to return EOF. We should document that.
The text was updated successfully, but these errors were encountered: