|
Dan Kortschak |
at Apr 2, 2013 at 11:54 pm
|
⇧ |
| |
The xml.CharData token is not usable after the next call to Token()
(actually the xml data buffer is not usable hence the next token local
name being what you see as the prefix of the char data). You are
effectively doing this because of the use of the goroutine to read the
xml stream - it can go ahead and read the next token as soon as you have
accepted the token in the range loop, clobbering your char data. I would
just include the reading in the main routine.
In short, your code is racey.
On Tue, 2013-04-02 at 12:56 -0700, bubblenut@gmail.com wrote:I've found a bug with the standard library XML parser. I've created a
test that reproduces it (gist below) but I'm having a little trouble
digging finding the source of the issue. Could someone with a little
more insight into the XML parser help out?
https://gist.github.com/robyoung/5295628 --
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.