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: rejection of *string field used as attribute #5334

Closed
gopherbot opened this Issue Apr 23, 2013 · 7 comments

Comments

Projects
None yet
4 participants
@gopherbot
Copy link

gopherbot commented Apr 23, 2013

by deemok:

The following struct does not marshal:
type foo struct {
    Name *string `xml:"name,attr"`
}
Giving 'xml: unsupported type: *string'

It does not work both on playground and on tip

Although, there's https://golang.org/issue/3719 which describes the
same issue, the fix surprisingly only implements the unmarshaling part.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Apr 23, 2013

Comment 1 by deemok:

Submitted https://golang.org/cl/8653047 for review.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Apr 23, 2013

Comment 2 by deemok:

Sorry, the patch is no good - I made a typo and the test would have failed. 
Will submit a new patch when it's ready!
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Apr 24, 2013

Comment 3 by deemok:

Also, the following does not marshal albeit silently (w/o giving an error and w/o
producing the output for the chardata field):
type foo struct {
    XMLName xml.Name `xml:"foo"`
    Text *string `xml:",chardata"`
}
@davecheney

This comment has been minimized.

Copy link
Contributor

davecheney commented Jun 1, 2013

Comment 4:

https://golang.org/cl/8653047

Status changed to Started.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jul 30, 2013

Comment 5:

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

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jul 30, 2013

Comment 6:

Labels changed: added feature.

@bradfitz

This comment has been minimized.

Copy link
Member

bradfitz commented Aug 8, 2013

Comment 7:

This issue was closed by revision 547f1a6.

Status changed to Fixed.

@gopherbot gopherbot added fixed labels Aug 8, 2013

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

@rsc rsc removed the go1.2maybe label Apr 14, 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.