Go the right way: the Zen of Go coding
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 🔐