Google Go Style Guide

Lots here:


Code is edited many more times than it is written. Readable code not only makes sense to a reader who is trying to understand how it works, but also to the programmer who needs to change it. Clarity is key.

Maintainable code:

  • Is easy for a future programmer to modify correctly
  • Has APIs that are structured so that they can grow gracefully
  • Is clear about the assumptions that it makes and chooses abstractions that map to the structure of the problem, not to the structure of the code
  • Avoids unnecessary coupling and doesn’t include features that are not used
  • Has a comprehensive test suite to ensure promised behaviors are maintained and important logic is correct, and the tests provide clear, actionable diagnostics in case of failure