Company-wide Go standards
Every Go project at the company handled errors, logging, tests and folder layout its own way. Moving between projects was slow, and reviews kept reopening the same questions.
Result
7standards
Every new Go project at a company of 30+ engineers started from them, and fewer reviews reopened the same questions.
- Error handling
- Logging
- Comments
- Functions
- Testing
- Folders & files
- Naming
Before
Every project its own way
After
7 agreed standards
Key decision
Agree every standard with all Go developers before writing it down.
What I did
- Visible in the code
The same layout in the open-source Shopify template and later projects.
Hardest part
Getting Go developers to agree across projects
Teams had different conventions for errors, logging and tests. I led the backend standards committee, set the agenda and brought one decision at a time to the Go developers. New projects could start with those decisions already made.