News for hackers. Stuff that matters.
Re:Four days of Go by rickhanlonii on Wednesday April 22, 2015 @05:12PM (#9423574)
The best example of this for me is the initialism style rule:

> Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". Here's an example: ServeHTTP not ServeHttp.

> This rule also applies to "ID" when it is short for "identifier," so write "appID" instead of "appId".

> Code generated by the protocol buffer compiler is exempt from this rule. Human-written code is held to a higher standard than machine-written code.

To enforce this in the linter they literally define a list of initialisms[1].

[1]: https://github.com/golang/go/wiki/CodeReviewComments#initial... [2]: https://github.com/golang/lint/blob/master/lint.go#L695

There are no comments on this comment yet.