Go the right way: the Zen of Go coding
x-log [Unofficial]
March 6, 2026
Go the right way: the Zen of Go coding
- Write packages, not programs
- Test everything
- Write code for reading
- Be safe by default
- Wrap errors, don’t flatten
- Avoid mutable global state
- Use (structured) concurrency sparingly
- Decouple code from environment
- Design for errors
- Log only actionable information
The security engineer in me especially likes the pointer to the os.Root API to avoid path traversal attacks 🔐
Thanks for reading this post via RSS. You're awesome ♥️
Discussion in the ATmosphere