Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: duplicate struct field tag check does not handle XMLName #18256
In Go 1.8beta1 a new check to detect duplicate names used in struct field tags was introduced to
Both cases are addressed in CL 34070.
The original implementation does not take into account the specific behavior of
No warning is currently generated for a struct field with
I am currently working on an implementation.
EDIT: added detailed description of original problem addressed by CL 34070
Detecting duplicate names defined through
By now I have a hacky proof of concept using a two-pass approach that does not detect DupAttr2 and generates duplicate error messages when one of the duplicate tags is malformed. On the upside, that approach mostly leaves
All in all I do not think that I will be able to get this ready in time for Go 1.8. As the original issue of false warnings is addressed I do not think it is critical to include it either.