Property and configuration field names should clearly communicate their purpose, behavior, and relationships to other components. Avoid ambiguous or misleading names that require additional context to understand.
When naming properties, consider:
Examples of improvements:
// Poor: Ambiguous about whether it's for custom or predefined formats
CustomFormat string
// Better: Clear that it handles both predefined and custom formats
Format string
// Poor: Doesn't indicate these are fallback options
AdditionalKeyLookups []string
// Better: Clearly indicates fallback behavior and order
FallbackKeyLookups []string
// Poor: Inconsistent with standard naming patterns
IsLiveEndpoint string
// Better: Consistent with conventional endpoint naming
LivenessEndpoint string
Well-chosen names reduce cognitive load, improve code maintainability, and make APIs more intuitive for other developers to use.
Enter the URL of a public GitHub repository