People ask me fairly often where to start with Go. This is the list I give them, in the order I would go through it. It is deliberately short — the biggest problem with most resource lists is that they hand you forty links and no sense of what to open first.
NOTE
This was written in 2022. The official material at the top has been kept current by the Go team and is still exactly what I would recommend; a few of the community blogs further down have not been updated since. I have left them in because the writing is still good, but check publication dates before trusting version-specific details — particularly anything predating generics in Go 1.18.
Start here
Take A Tour of Go (opens in a new tab) first. It runs in the browser, takes an afternoon, and covers enough syntax that the rest of the material stops looking foreign.
Then read these two, in this order:
- How to Write Go Code (opens in a new tab) — how modules and packages fit together. Read it before you write anything non-trivial, because Go has firm opinions about layout and fighting them is miserable.
- Effective Go (opens in a new tab) — the closest thing to an official style guide. This is the one that teaches you to write Go rather than write your previous language in Go syntax.
Once you can read Go
- Go by Example (opens in a new tab) — annotated programs, one concept each. Best used as a reference when you know what you want but not the idiom.
- Idiomatic Go (opens in a new tab) — specific habits that separate Go that works from Go that reads well.
- How to avoid Go gotchas (opens in a new tab) — the traps everyone hits once. Worth reading before you hit them.
- Go database/sql tutorial (opens in a new tab) — the standard library's database interface, which is unusual enough to deserve its own read.
For tutorials at a gentler pace, golangbot (opens in a new tab) and TutorialEdge (opens in a new tab) both work through the language in order.
Books
- The Go Programming Language (opens in a new tab) — Donovan and Kernighan. If you buy one Go book, buy this one.
- Go in Action (opens in a new tab) — more practical and less complete. Email William Kennedy at bill@ardanlabs.com and you might get a free copy.
Going deeper
- Standard Package Layout (opens in a new tab) — how to organise a Go project once it outgrows a single package. Structure is where most new Go codebases go wrong.
- Go Walkthrough (opens in a new tab) — a series that reads through the standard library package by package. The standard library is unusually worth reading in Go; a lot of the language's idioms only make sense once you have seen how it uses them.
- The Go Language Specification (opens in a new tab) — short enough to read in one sitting, which is not true of most language specs. Worth doing once you are comfortable, if only to see how small the language really is.
Keeping up
- Go Time (opens in a new tab) — weekly podcast, good for hearing what the community is arguing about.
- Gopher Academy Blog (opens in a new tab) — long-form posts from people building substantial things in Go.
- Go talks archive (opens in a new tab) — conference talks from the Go team. Rob Pike's talks on concurrency are the ones to start with.
- The Go wiki's learning list (opens in a new tab) — if you finish all of the above and want more.
If you only do one thing
Read the standard library. Not all of it — pick a package you already use, net/http or io or strings, and read the source. Go's standard library is written to be read, and an hour in there teaches you more about how to write Go than any tutorial will.