As our codebase grows, eventually we'll need to refactor some of it. For example, consider moving pieces of code between levels abstractions or
time.Duration
values represent an amount of time, which is represented as a count of nanoseconds. An expression like 5 * time.Microsecond
yields the value 5000. It is therefore not appropriate to suffix a variable of type time.Duration
with any time unit, such as Msec
or Milli
.
It is recommended that the error variables that are part of an API should be named as errFoo
, ErrSomethingBad
, ErrKindFoo
or BazError
.
For better readability, always place default
of switch as first or last case.
Comments should have a space between the //
and the comment text