-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/xml: add check of namespaces to detect field names conflicts
Test added. Fixes #8535 Change-Id: Ic89c2781e81d963a653180812748b3fc95fb7fae Reviewed-on: https://go-review.googlesource.com/c/go/+/106575 Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
- Loading branch information
Showing
2 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b459166
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix still has problem, unmarshal does not report error, but when there are conflict names, only one field can get value, please see the example at:
https://go.dev/play/p/oVK2cC3KExw
b459166
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use GitHub for code review, and very few people see comments on GitHub commits. If you want to commit, please see https://go.dev/cl/106575.
In this case see also https://go.dev/cl/466295.