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

encoding/xml: incorrect EOF behavior in (*Decoder).Token #13757

Closed
alandonovan opened this Issue Dec 28, 2015 · 6 comments

Comments

Projects
None yet
6 participants
@alandonovan
Copy link
Contributor

alandonovan commented Dec 28, 2015

The docstring for (*Decoder).Token says "At the end of the input stream, Token returns nil, io.EOF", but when this program

http://play.golang.org/p/8pqgfMmPuU

is run using a tip (not Go 1.5) distribution, the resulting error is an *xml.SyntaxError.

This bug is causing the golang.org/x/tools/go/vcs tests to fail.

@alandonovan alandonovan changed the title encoding/xml: unclear spec for EOF in (*Decoder).Token encoding/xml: incorrect EOF behavior in (*Decoder).Token Dec 28, 2015

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Dec 29, 2015

This bug is causing the golang.org/x/tools/go/vcs tests to fail.

This part has been resolved independently (by resolving #13683 and applying that fix to x/tools/go/vcs in https://golang.org/cl/18196).

But the rest mentioned here ((*Decoder).Token documentation and behavior not matching) is still a valid (and unrelated) issue, right?

@alandonovan

This comment has been minimized.

Copy link
Contributor Author

alandonovan commented Dec 29, 2015

Yes.

@bradfitz bradfitz added this to the Go1.6 milestone Jan 21, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

bradfitz commented Jan 21, 2016

Regression from Go 1.5.

@jhawk28

This comment has been minimized.

Copy link

jhawk28 commented Jan 22, 2016

The change to Token was made by this commit: bf21643

It may just need a documentation update.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jan 24, 2016

Working as intended. CL 18854. Already mentioned in http://tip.golang.org/doc/go1.6. Note that "" is not a well-formed XML document: it is missing the "".

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Jan 24, 2016

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

@gopherbot gopherbot closed this in 970ce1c Jan 24, 2016

@golang golang locked and limited conversation to collaborators Jan 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.