Skip to content

encoding/xml: empty namespace conventions are badly documented #11735

@ainar-g

Description

@ainar-g

During the discussion in #11724 @rogpeppe wrote:

The existing Go convention is that if no namespace is specified in the struct tag, it will match any namespace including the empty namespace.

But the package docs don't seem to mention that. This behaviour should be documented better, because a lot of people will assume that xml:"name,attr" will match name="foo" but not ns:name="bar".

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions