about this book
A language that doesn’t affect the way you think about programming is not worth knowing. —Alan Perlis, Epigrams on Programming
Many programmers initially find Go straightforward only to discover that grasping its unique philosophy—its emphasis on simplicity and pragmatism—is a deeper journey. Go by Example is your practical, hands-on guide not just to writing Go but also to thinking in Go. This book isn’t a collection of trivial, out-of-context code snippets. It immerses you in realistic projects, from command-line tools and concurrent clients to services. With these examples, you not only learn to write Go but also understand its idiomatic philosophies and principles:
- Move beyond syntax to embrace the Go mindset. We’ll focus on writing code that is simple, straightforward, pragmatic, and easy for fellow Go developers to understand.
- Discover how Go’s principles and tooling help us write code that is robust and easy to test from the ground up, leading to more reliable and maintainable software.
- Structure packages effectively, handle errors robustly, structure for concurrency, and compose types from well-defined simple building blocks for adaptability.
- See how much you can accomplish with Go’s rich set of built-in packages, fostering a preference for standard solutions before reaching for external dependencies.