Zum Inhalt springen

Constant Casing (ARCH5006)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.