In C++, a commonly used naming convention is PascalCase
for types (classes) and camelCase
for variables. This allows the same name to be used for both without clashing:
class FooList {...};
FooList fooList;
A similar convention exists in Python:
class FooList: ...
foo_list = FooList()
In Go, assuming neither of these is to be exported, it seems the standard naming convention would call both the same thing: fooList
.
Is there a recommended way to avoid this name clash?