4 ms·
> They're called tags, not annotations, per the spec (https://golang.org/ref/spec https://golang.org/ref/spec). I don't know what you're trying to say there, bu
by frankietwenty9 8y ago
> They're called tags, not annotations, per the spec (https://golang.org/ref/spec https://golang.org/ref/spec). I don't know what you're trying to say there, but it's using wrong terminology.
My mistake
> How is that possible? As you say on the next line, they don't need to conform to any format. How can my linter know that I don't have a package that parses "josn" tags, and that I typoed? Please link me to the lint rule if it exists.
https://golang.org/cmd/vet/#hdr-Struct_tags https://golang.org/cmd/vet/#hdr-Struct_tags
- TheDong 8y agoThe struct tags vet will not catch the typo I mentioned. It would catch `json:"missing closing quote`; it would not catch the "josn" typo.