Prompt
Adhere to Go naming conventions and maintain consistency with established codebase terminology. This includes proper capitalization of acronyms (e.g., “OCI” not “Oci”), avoiding underscores in identifiers, following standard library naming patterns, and using consistent terminology throughout the codebase.
Key guidelines:
- Capitalize acronyms properly:
GetOCICreds()notGetOciCreds() - Avoid underscores in Go names as flagged by golangci-lint
- Follow standard library patterns:
unmarshalYamlFilenotunMarshalYamlFile(consistent withjson.Unmarshal) - Use consistent terminology: prefer
APIVersionovergroupVersionwhen it aligns with backend terminology - Add conventional suffixes where expected: timestamp gauges should include
_secondssuffix
Example:
// Good - follows Go conventions
func (repo *Repository) GetOCICreds() oci.Creds {
// implementation
}
// Bad - incorrect acronym capitalization
func (repo *Repository) GetOciCreds() oci.Creds {
// implementation
}
Consistent naming reduces cognitive load, improves code readability, and aligns with community expectations and tooling requirements.