The Best Books For Learning Golang
Go is a language that has drastically grown in popularity over the past few years. We’ve seen companies such as HashiCorp adopt it as their primary language of choice for all of their projects and with good reason. It’s undoubtedly an absolutely fantastic language to develop with.
Getting started with Go is relatively straightforward and its syntax and language structure make it easy to adopt as your primary development language.
If you are new to Go, then I recommend you check out some of the introductory books from this list in order to give yourself a solid foundation in the basics of the language.
The fact that it’s compiled means that deploying your Go based programs is incredibly simple, you can compile it for that particular platform and you end up with a binary executable that you can just run on top of that platform without any fuss around things like dependencies.
In this article we are going to step through some of the top books you can buy in order to get yourself started with the language. These reviews are entirely subjective and will hopefully give you enough of a taste of the book in order to make an effective decision.
If you are completely new to Golang then this is the section to start in. The books below are gentle introductions to the language and should help to get you started on your Golang journey.
Note - If you are entirely new to programming then these may not be for you and I would recommend checking out some basic tutorials/books first before you try these out.
The Go Programming Language
Alan A. A. Donovan & Brian W. Kernignhan (Addison-Wesley, 2015)
The Go Programming language by Alan A. A. Donovan and Brian W. Kernighan is an absolutely fantastic book that I would highly recommend to everyone wanting to get up to speed with the language. It’s comparatively cheap when compared to other technical books and is packed full of excellent information about the fundamentals of go.
It’s ideal for those of you who want to learn how to write idiomatic Go in real-life situations and requires no prior knowledge of the language. I’ve got a copy of it sitting on my desk that I use often as a reference for some of the more complex aspects of Go and it has yet to let me down!
It starts of by covering the absolute fundamentals, things such as methods, functions, complex and basic data types and then gradually works it’s way up to more complex topics such as the basics of concurrency and writing concurrent programs.
In chapters 10, we start covering more complex topics such as Go packages and how you can import them, as well as the various naming conventions used for these Packages.
Chapter 11 then goes on to cover testing and is an excellent primer on writing the all important tests for any of the systems you subsequently start developing.
In the final chapters, the book goes into detail about complex topics such as Reflection as well as covering some of the low-level programming fundamentals such as foreign function interfaces (FFI) and calling out to C code.
The Book Covers
- The Fundamentals of Go
- Concurrency in Go
- Packages and the Go Tool
- Low-level programming
Go in Action (1st Edition)
William Kennedy, Brian Ketelsen, Erik St. Martin (Manning, 2015)
Go in Action represents an excellent introduction to Google’s own Go programming language. Within the confines of the 250 odd pages it manages to cover everything you need to get up and running with this language. All in all it complements the Go Programming Language book currently sitting in first position.
You’ll spend time within this book building real-world applications such as web sites and servers and come away a proficient golang developer.
Manning books are renowned for their high quality books and this one truly is no different.
The Book Covers
- A Quick start guide to go
- The packages and tooling
- Concurrency and Concurrency Patterns
- The Standard Library
- Testing and Benchmarking
Caleb Doxsey (O’Reilly, 2016r)
Introducing Go by Caleb Doxsey is a fantastic, affordable O’Reilly book that is ideal for those of you with no knowledge of the Go programming language. The book gives very simple examples that bring you up to speed quickly and concisely.
The book starts off with simple concepts and builds up to more advanced topics such as testing and concurrency. Overall, I’d recommend this book in conjunction with one of the above books as it is a quick and easy introduction to the language, good for getting up and running quickly but you may desire more in-depth coverage of the advanced topics once you are done.
The Book Covers
- Getting started with Go
- Go’s Type System
- Structs and Interfaces
In this section, we’ll be covering some of the books that can certainly help you make the transition from novice Go programmer to intermediate and further push the bounds of your programming knowledge.
Writing an Interpreter in Go
Thorsten Ball (Self-Published, 2018)
Writing an Interpreter in Go is an absolutely incredible book that was very much anticipated by swathes of Go programmers since it’s announcement. So far, it has been very well received and has seen loads of great reviews on the likes of Amazon and for good reason.
I’m about half way through this book at the time of writing this and the way that it gradually builds up on the language you’ll be building within the series is exceptional. Having never looked much into language design and parsers, it’s an eye-opening experience that is fun to follow along with all whilst improving on your Go skills.
It absolutely should not be mistaken for a book that teaches you the core concepts of Go however, thus the reason it is in the intermediate class of this article.
Writing a Compiler in Go
Thorsten Ball (Self-Published, 2018)
Writing a Compiler in Go is the second book by Thorsten Ball and has only just been released and I’ve heard from fellow programmers that the book is just as good, if not better than the first in this series.
It follows on from where the previous book left off and has you working towards building a compiler for your language. This book series absolutely is a must buy if you are looking to improve your Go knowledge whilst subsequently improving your underlying Computer Science knowledge.
I’m very much looking forward to working through this book once I get a chance to finish the first and also looking forward the next books in his series!
In this section I’ll be listing books which are more advanced in nature and cover material that may be unsuitable for those who have little-to-no experience with the go programming language.
Concurrency in Go: Tools and Techniques for Developers
Katherine Cox-Buday (O’Reilly, 2017)
If you are interested in building the highest-of-performance Go based applications, this book is for you. It helps you ground yourself in the fundamentals of writing highly-concurrent Golang based applications that are both safe and efficient.
The book starts off by covering the basics of concurrency such as deadlocks,
livelocks and starvation as well as the dreaded race condition and then starts
covering the basics of goroutines, as well as the
In the last chapters of the book, it starts to cover some of the key concurrency patterns and how you can manage concurrency at scale.
Overall, it’s an excellent primer to the world of concurrency and a great addition to your Go book library.
Hopefully, you found this list of the best books for learning Go useful! I am a huge fan of the language and would love to hear your comments as to how you got on with certain books and during your times trying out the language in the comments section below.
I’d also love to hear if you have any of your own recommendations on new books that I haven’t included in this list.