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: typo in docs #12833

Closed
ShawnMilo opened this Issue Oct 3, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@ShawnMilo
Copy link

ShawnMilo commented Oct 3, 2015

The documentation of func Unmarshal states:

Unmarshal uses a case-sensitive comparison to match XML element names to tag values and struct field names.

Unless I'm really confused about something, that should be "case-insensitive" instead. At least, that's my experience with using encoding/xml and encoding/json.

@rakyll rakyll changed the title Typo in encoding/xml package. encoding/xml: typo in docs Oct 3, 2015

@rakyll

This comment has been minimized.

Copy link
Member

rakyll commented Oct 3, 2015

The documentation is accurate. The field won't match if the XML element's case doesn't match. See http://play.golang.org/p/9oZIgl9n3X where Name is an empty string after unmarshalling.

@rakyll rakyll closed this Oct 3, 2015

@golang golang locked and limited conversation to collaborators Oct 4, 2016

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.