Choose names that accurately reflect the behavior and purpose of code elements. Names should be semantically precise and avoid misleading implications. This applies to methods, variables, and configuration parameters.
Choose names that accurately reflect the behavior and purpose of code elements. Names should be semantically precise and avoid misleading implications. This applies to methods, variables, and configuration parameters.
Key guidelines:
Examples:
// Misleading - implies just getting indexes
func getIndexes(k string, indexes []int)
// Better - accurately describes behavior of populating the slice
func fillIndexes(k string, indexes []int)
// Misleading - implies attaching something
func attachRateLimiter(config *Config) RateLimiter
// Better - accurately describes creating a new instance
func newDefaultRateLimiter() RateLimiter
// Misleading - implies complete draining
func drainBuffer(items []Item)
// Better - accurately describes partial processing
func processBuffer(items []Item)
Enter the URL of a public GitHub repository