Go by Example cover
welcome to this free extract from
an online version of the Manning book.
to read more



Thanks for purchasing the MEAP for Go by Example: Programmer's guide to idiomatic and testable code. If you want to write Go code that’s easy to maintain and extend, you’ve come to the right place!

To get the most benefit from this book, you’ll need to be an experienced developer with an intermediate knowledge of testing in any language. You may be new to Go, but knowing the basics will help along the way.

As I write this, there’s no book yet on testing in Go, but there’s a growing need for developers. Go is a young language, and hundreds of thousands of developers from other programming languages come to Go every year. If you’re one of them, you may be wondering how to transfer your existing knowledge of other languages, particularly when it comes to testing.

This book will teach you how to implement practical, real-life Go projects with tests from scratch. I’ll be showing you different testing approaches—what to do, what not to do, and when and why you should use a particular method using real-life, practical examples you might encounter in the workplace.

I got the idea for this book based on questions I received from folks who’ve taken my Udemy course or are following my blog. Idiomatic Go will answer these questions and more: