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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does 'go version' print?
go version go1.2.1 linux/amd64
What steps reproduce the problem?
Just to http://play.golang.org/p/85oWtwZAq9 and Run.
What happened?
Embedded struct defines XMLName field with xml.Name type and with corresponding field
tag. xml.Marshal ignores this XMLName field from embeded struct and outer tag is
generated from object's struct type name.
What should have happened instead?
Documentation for xml.Marshal says:
- an anonymous struct field is handled as if the fields of its
value were part of the outer struct.
So I expected that XMLName of type xml.Name from embedded struct should be marshaled as
xml tag name.
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
Not sure if this related. Here we don't have non-exported fields and it doesn't work on
go 1.2.1 either. I actually prepared a CL for this issue.
https://golang.org/cl/79210044/
by alex.vizor:
The text was updated successfully, but these errors were encountered: