Just added: Algorithms you can run and practice
Updated Jun 22, 2026 Edit on GitHub

Go From Zero

You keep hearing that Go is the language behind Docker, Kubernetes, and half the cloud - that it's fast, simple, and great at doing a thousand things at once. Then you open a Go file and it looks oddly bare: no classes, no exceptions, a loop that doesn't say while, and a compiler that flat-out refuses to build your program over an unused variable. That bareness isn't an accident, and it isn't something to fight. Go was deliberately kept small so that a whole team can read each other's code without surprises.

This guide takes you the whole way: from "I've never written a line of Go" to understanding what the language and its runtime are actually doing underneath your code. We'll go mental-model-first the whole way: before any command, you'll understand what the thing actually is and why Go made the choice it did.

It's one zero-to-hero journey in two halves. Phases 1–9 are the basics - enough to read real Go, structure a project, and use the concurrency it's famous for. Phases 10–17 are the deep half - interfaces, generics, real concurrency patterns, the runtime scheduler and garbage collector, testing and profiling, the standard library, and performance, the stuff that separates "writes Go" from "understands Go." Each phase carries a difficulty badge so you can see the climb.

If you've never programmed at all, you'll want a gentler on-ramp first - start with Programming From Zero, then come back here.

How to read this

  • Brand new to Go? Read 1–9 in order. Each phase builds on the last. Phases 1–5 give you the language and how to organize it; phase 6 is the payoff (concurrency); 7–9 round you out into someone who can ship. Come back for 10+ when the basics feel comfortable.
  • Already know another language? Skim phases 1–5 to catch where Go is deliberately different (one loop, multiple returns, exported = capitalized, no exceptions), then slow down at phase 6 - goroutines and channels are where Go stops looking familiar and starts being Go.
  • Past the basics already? Jump to the deep half - Phase 10: Interfaces in Depth onward is where Go stops being "a small, readable language" and starts being one you can reason about down to the scheduler.

The phases

Part 1 - The basics (🟢 Basic → 🟡 Intermediate)

  1. Install & Your First Program 🟢 - the Go toolchain, hello.go, and the refusal to compile unused code.
  2. Syntax, Values & Types 🟢 - var vs :=, static typing, the basic types, and zero values.
  3. Collections 🟢 - arrays vs slices, append, maps, and looping with range.
  4. Control Flow & Functions 🟢 - the single for, if, switch, and multiple return values.
  5. Modules & Project Layout 🟢 - go mod init, packages, exported = capitalized, a sane layout.
  6. Goroutines & Channels 🟡 - the reason Go exists: many things at once, safely, with go and channels.
  7. Errors & I/O 🟡 - "errors are values" (no exceptions), and reading/writing files and streams.
  8. Ecosystem & Tooling 🟡 - go test, go fmt, go vet, modules, the batteries-included toolchain.
  9. Idioms & Gotchas 🟡 - how Go programmers actually write Go, and the traps that bite everyone once.

Part 2 - Beyond the basics (🔴 Advanced) 10. Interfaces in Depth 🔴 - interface values as (type, value) pairs, type assertions and switches, the nil-interface trap. 11. Generics & Advanced Types 🔴 - type parameters, constraints, method sets, and when generics beat interfaces. 12. Concurrency Patterns 🔴 - select, context, worker pools, fan-in/out, the sync toolbox, the race detector. 13. Error Handling, Deep 🟡 - wrapping with %w, errors.Is/As, sentinel and custom errors, panic/recover. 14. The Runtime: Scheduler, Memory & GC 🔴 - the GMP scheduler, stack vs heap, escape analysis, the garbage collector. 15. Testing, Benchmarks & Profiling 🟡 - table-driven tests, benchmarks, pprof, coverage, fuzzing. 16. The Standard Library as Design 🟡 - io.Reader/Writer, context, encoding/json, net/http as a masterclass. 17. Performance & Optimization 🔴 - cutting allocations, sync.Pool, and profile-driven optimization.

Finale 18. Where to Go Next 🟢 - web, CLIs, cloud & infra, and what to actually build.

Frameworks and big projects (gRPC, Kubernetes internals, cgo) are their own world - this guide makes the language and its runtime make sense, top to bottom.