Skip to content

Possible bug in staticcheck - where should I report it? #5879

Closed Answered by ldez
denisgcm asked this question in Q&A
Discussion options

You must be logged in to vote

You should open an issue on the staticcheck repository: https://github.com/dominikh/go-tools

But I cannot see something related specifically to xml.Name and any inside the encoding/xml documentation.
I can only see references to attributes and sub-elements. A tag name is neither an attribute nor a sub-element.

  • If the XML element has an attribute not handled by the previous rule and the struct has a field with an associated tag containing ",any,attr", Unmarshal records the attribute value in the first such field.
    ...
  • If the XML element contains a sub-element that hasn't matched any of the above rules and the struct has a field with tag ",any", unmarshal maps the sub-element to that struc…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@denisgcm
Comment options

Answer selected by denisgcm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants