Learning how to write readable Go code is an essential part of the language. Language developers used their previous experience while writing other languages to create a language that they felt was clear and concise. A commonly used phrase in describing the proper way to write with this language is idiomatic Go. This phrase is used to describe the correct way to program in Go. Style is often subjective, but the Go team has worked hard in order to write the language in an opinionated way and facilitate developer velocity, readability, and collaboration. In this chapter, we are going to talk about how to maintain some core tenets of the language:
- Simplicity
- Readability
- Packaging
- Naming
- Formatting
- Interfaces
- Methods
- Inheritance
- Reflection
Understanding these patterns and idioms will help you to write Go code that is more easily readable and operable between...