verless / verless

A Static Site Generator designed for Markdown-based content with a focus on simplicity and performance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if abbreviations and acronyms are named correctly

dominikbraun opened this issue · comments

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, not MethodPOST.
  • On the contrary, 'HTTP' is an acronym, so a valid function name would be ServeHTTP - not ServeHttp.
  • Depending on the scope, all characters in an acronym must have the same case, e.g. http or HTTP, but not Http.
  • This also applies to 'ID': Either id or ID, but never Id.

In case there are violations to those rules in the verless codebase, they shall be corrected.

I didn't find any place where we need to improve abbrevations.
I only found model/page.go which already satisfies code review comments.