cmd/vet: warning with duplicate `json:"omitempty"` field tag #22595
Labels
Comments
You are missing the leading comma
I believe it's required. |
@ALTree is correct. (As is cmd/vet... it found a real problem.) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
Write the following code in VSCode:
Then save, which will trigger
go tool vet
on the file. The last line (ChildVMs...) will then be highlighted with a curly green line, indicating a warning, saying it has a duplicate tag that's already defined.What did you expect to see?
No curly green line on the last field definition since it should be OK to have multiple lines with that tag.
Over at the repository for the Go-VSCode plugin I posted a screenshot.
The text was updated successfully, but these errors were encountered: