Hacker News new | ask | show | jobs
by frankietwenty9 2992 days ago
> They're called tags, not annotations, per the 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

1 comments

The struct tags vet will not catch the typo I mentioned.

It would catch `json:"missing closing quote`; it would not catch the "josn" typo.