Constants such as physical values or well-known parameters of mathematical functions may have short names; however, the ignore-decls configs don't allow specifying allowed const declarations.
A code excerpt from one of my projects:
const (
// C is the speed of light in a vacuum, m/s.
C = 299792458
// G is the gravitation constant, m^3/kg/s^2.
G = 6.67408e-11
// ...
)
As long as varnamelen checks constants, it should be possible to ignore them just like variables.
Constants such as physical values or well-known parameters of mathematical functions may have short names; however, the
ignore-decls
configs don't allow specifying allowed const declarations.A code excerpt from one of my projects:
As long as varnamelen checks constants, it should be possible to ignore them just like variables.