Contributing
Code Style and Conventions
Section titled “Code Style and Conventions”This project follows standard Go conventions as outlined in Effective Go and the Go Code Review Comments.
Naming
Section titled “Naming”- Use MixedCaps or mixedCaps rather than underscores for multi-word names
- Acronyms should be all capitals (e.g.,
URL,HTTP,API) - Interfaces with a single method should be named with the method name plus the
-ersuffix (e.g.,Reader,Writer) - Package names should be short, concise, lowercase, and without underscores or mixedCaps
Code Organization
Section titled “Code Organization”- Organize imports into groups: standard library, third-party, local packages
- Use
make fmtto format all code before committing - Run
make vetto catch common mistakes
Error Handling
Section titled “Error Handling”- Always check errors; don’t use
_to discard errors unless you have a good reason - Provide context when returning errors using
fmt.Errorfwith%wfor wrapping - Use meaningful error messages that help debugging