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: XML marshalling with attribute slice field panics #6341

Closed
gopherbot opened this Issue Sep 6, 2013 · 4 comments

Comments

Projects
None yet
4 participants
@gopherbot
Copy link

commented Sep 6, 2013

by dahankzter:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Try to marshal (xml) a struct with attribute marked field of type []string
http://play.golang.org/p/rUI1x6pOnh

What is the expected output?
An error returned from marshal

What do you see instead?
It panics.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Archlinux 64 bit

Which version are you using?  (run 'go version')
go version go1.1.2 linux/amd64

Please provide any additional information below.
I realize it is a bit of an unorthodox usage that may not even make sense but an error
is perhaps preferable to a panic?
@kortschak

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2013

Comment 1:

CL 13591044 though concerned about performance impact (not yet measured).
@robpike

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2013

Comment 2:

Dan: Please mail your CL for review (hg mail 13591044)

Labels changed: added priority-soon, go1.2, removed priority-triage.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2013

Comment 3:

This issue was closed by revision 10c36fb.

Status changed to Fixed.

@kortschak

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2013

Comment 4:

Apologies - issue wasn't starred, so didn't get mail.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015

@rsc rsc removed the go1.2 label Apr 14, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 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.