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: possible bugs in xml.go #2271

Closed
gopherbot opened this Issue Sep 18, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@gopherbot
Copy link

gopherbot commented Sep 18, 2011

by dmuysers@hotmail.com:

I am neither a contributor nor a golang user, but perusing your code "xml.go"
I have noticed the following possible inconsistencies:

1) RawToken () case '?' line 492 at first iteration "b0" value is undefined.
(Should I trust the compiler to clear the locals?)

2) space () line 727: '\n' =>  line count should be increased

3) nsname () line 974: simple "return" does not transmit ok (redefined in 972)
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Sep 18, 2011

Comment 1 by dmuysers@hotmail.com:

Apologies for point 1) getc() has done it already!
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Sep 18, 2011

Comment 2 by dmuysers@hotmail.com:

It's point 2) (space())
@bradfitz

This comment has been minimized.

Copy link
Member

bradfitz commented Sep 18, 2011

Comment 3:

1) yes, it's zero by default. the language defines that.
2) yes, getc does that
3) it's fine. a) they're in the same scope; it's not redefined. b) if it it were
redefined, it's only returning on !ok, and would be returning false for ok. even it's a
false from elsewhere, it's still false.

Status changed to Invalid.

@mikioh mikioh changed the title possible bugs in xml.go encoding/xml: possible bugs in xml.go Jan 9, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

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.