News for hackers. Stuff that matters.
Re:Go: The Good, the Bad and the Ugly by frankietwenty9 on Friday April 13, 2018 @02:58PM (#16832947)
> 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

Re:Go: The Good, the Bad and the Ugly by TheDong on Friday April 13, 2018 @03:16PM (#16833092)
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.