ksimka / go-is-not-good

A curated list of articles complaining that go (golang) isn't good enough
3.82k stars 129 forks source link

tags are arbitrary strings, no compiler checked syntax #50

Closed n4zukker closed 5 years ago

n4zukker commented 5 years ago

Pop quiz. What's wrong with this:

`json:"foo.omitempty"

The language should have put some structure on tags. Instead of opening a loophole where weird syntax can be added and conventional values are not checked. The compiler or linter should have at least warned that there's a period where a comma should be.

ksimka commented 5 years ago

This repo is not about complaining in issues, sorry.

n4zukker commented 5 years ago

Ok. I'll make a PR. I saw that just now at the bottom of the repo.