Check if abbreviations and acronyms are named correctly
dominikbraun opened this issue · comments
Dominik Braun commented
There are some abbreviations and acronyms in the verless codebase, for example ID
or Addr
. We should check whether these abbreviations are named correctly according to Go Code Review Comments and Effective Go.
To sum it up, the rules for correct naming look like this:
- HTTP knows the POST method, but 'POST' is not an acronym. Therefore, a valid name is
MethodPost
, notMethodPOST
. - On the contrary, 'HTTP' is an acronym, so a valid function name would be
ServeHTTP
- notServeHttp
. - Depending on the scope, all characters in an acronym must have the same case, e.g.
http
orHTTP
, but notHttp
. - This also applies to 'ID': Either
id
orID
, but neverId
.
In case there are violations to those rules in the verless codebase, they shall be corrected.
Samyak Bakliwal commented
I didn't find any place where we need to improve abbrevations.
I only found model/page.go which already satisfies code review comments.