Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/xml: XML marshalling with attribute slice field panics #6341
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?