Go the right way: the Zen of Go coding

Go the right way: the Zen of Go coding

  1. Write packages, not programs
  2. Test everything
  3. Write code for reading
  4. Be safe by default
  5. Wrap errors, don’t flatten
  6. Avoid mutable global state
  7. Use (structured) concurrency sparingly
  8. Decouple code from environment
  9. Design for errors
  10. Log only actionable information

The security engineer in me especially likes the pointer to the os.Root API to avoid path traversal attacks 🔐