Choose identifier names that clearly communicate their purpose while maintaining an appropriate balance between brevity and clarity. **Guidelines:**
Choose identifier names that clearly communicate their purpose while maintaining an appropriate balance between brevity and clarity.
Guidelines:
// Poor: Using abbreviated or generic names
cap, err := GetModel(n.String())
// Good: Name reflects the actual type
model, err := GetModel(n.String())
// Poor: Unnecessary abbreviation
type RopeOpts struct {}
// Good: Full word for clarity
type RopeOptions struct {}
// Too verbose
var templateToolPrefix, templateToolPrefixFound := ToolPrefix(model.Template.Template)
// Better balance
prefix, found := toolPrefix(model.Template.Template)
// Inconsistent with other handlers
func (s *Server) version(w http.ResponseWriter, r *http.Request)
// Consistent with other handler naming
func (s *Server) VersionHandler(c *gin.Context)
Avoid single-letter variables outside of short-lived scopes like simple loops.
// Poor: Ambiguous abbreviation
OLLAMA_GPU_DEVS
// Good: Clear, fully spelled out
OLLAMA_GPU_DEVICES
When choosing names, prioritize clarity for future readers over saving a few keystrokes now.
Enter the URL of a public GitHub repository