-
Notifications
You must be signed in to change notification settings - Fork 18k
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
fmt: Scanf misses last character with io.EOF #16393
Comments
CL https://golang.org/cl/24981 mentions this issue. |
It is correct to return both data and EOF in one call? From io.EOF doc: |
Yes, it is correct to return data and EOF in one call, although the situation is unfamiliar to many and is often mishandled. |
Thanks for important clarification. I think that should be clearly stated in EOF's doc to reduce number of mishandles. |
CC @martisch |
Commit 6520da6 caused a regression where the last character in a string would be dropped if it was accompanied by an io.EOF.
Consider the following test:
On
1.6.2
, this prints"hello"
.On
1.7rc1
, this prints"hell"
The text was updated successfully, but these errors were encountered: