Aller au contenu

Constant Casing (ARCH5006)

Ce contenu n’est pas encore disponible dans votre langue.

Key go.naming.constant-mixedcaps · Severity info · Category naming

In Go, package-level constants should use the MixedCaps convention; the UPPER_SNAKE_CASE carried over from other languages is not idiomatic. Consistent naming improves readability.

const MAX_RETRY_COUNT = 3
const DEFAULT_TIMEOUT = 30
const MaxRetryCount = 3
const DefaultTimeout = 30

Remove underscores and use MixedCaps for constants.