Introduction
Go is not an object-oriented language. No classes, no inheritance, no exceptions. If you’re coming from Ruby, that sounds like a step backward. But Go’s approach — structs instead of classes, composition instead of inheritance, errors instead of exceptions — produces code that is simpler, faster, and easier to maintain at scale.
This book is built on one idea: the fastest way for a Rubyist to learn Go is to map every Go concept back to Ruby. Each chapter starts with Ruby code you already understand, then shows the Go equivalent. You’re not learning from scratch — you’re translating.
Who This Book Is For
You should know Ruby. You don’t need to be an expert — if you can read a Ruby class, understand instance variables, and follow a begin/rescue block, you have what you need.
You don’t need to know Go at all. Chapter 1 starts from zero.
How to Use This Book
Read in order. Each chapter builds on the last. Concepts introduced in Chapter 3 reappear in Chapters 4, 5, and 7. Skip around and you’ll miss the foundation.
Type the examples. Every code sample is complete — copy, paste, and run. Then modify it. Change a value receiver to a pointer receiver and see what breaks. Delete from a nil map and watch the panic. The exercises at the end of each section give you specific things to try.
Read the Key Points. Each major section has a T> callout box summarizing the one thing to remember. If you’re skimming or reviewing, these are your landmarks.
Use the exercises. Every chapter ends with hands-on coding challenges. They’re not optional — Go is a language you learn by typing, not by reading.
What This Book Is Not
This is not a Go reference. It won’t cover every standard library package or every language feature. It covers the concepts a Rubyist needs to become productive in Go — the things you’ll actually use day to day.
If you want depth on specific topics after finishing this book, the Go documentation and Go by Example are excellent next steps.
About the Author
I’ve been writing software for over 20 years, from building a Java antivirus engine at VIPRE Security to scaling payment systems at DAZN to 10M+ daily transactions. I started programming as a kid and never stopped. Go became my primary language in 2018, and this book is the guide I wish I’d had when making the switch from Ruby. I live in Amsterdam with my family, where I write, build open-source tools, and work as a Senior Software Engineer.