-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Summary
The variable minUsagePadding is currently defined as a package-level variable, but it represents a fixed configuration value that never changes at runtime.
It would be more idiomatic and safer in Go to define it as a constant.
Current Code
var minUsagePadding = 25Proposed Change
Change it to:
const minUsagePadding = 25Rationale
- The value is immutable and conceptually a compile-time constant.
- Using
constmakes the intention clearer to readers and contributors. - It prevents any accidental modification at runtime and improves code safety.
Impact
This change is fully backward compatible and has no functional impact on behavior.
It only improves clarity and maintainability of the codebase.
Metadata
Metadata
Assignees
Labels
No labels