A structured, test-driven Go course — novice to production-ready. Built on spaced repetition, active recall, and Bloom's Taxonomy scaffolding.
Each exercise has objectives, concept explanations, and hints behind spoiler gates.
Every exercise.go has TODO markers. Your
job is to make the tests pass.
Use make check PHASE=… EX=… to get instant feedback on
each exercise.
Each phase ends with a spaced-repetition review exercise mixing everything covered so far.
Build fluency with Go's core syntax: types, control flow, functions, closures, slices, maps, strings, and error handling.
| # | Exercise | Concept |
|---|---|---|
| 01 | hello-world | package main, fmt.Println, compilation |
| 02 | variables | :=, var, zero values, multiple assignment |
| 03 | types | Basic types, type conversion |
| 04 | constants | const, iota |
| 05 | functions-basics | Single + multiple return values |
| 06 | functions-advanced | Named returns, variadic, first-class functions |
| 07 | closures | Closure capture, counter pattern |
| 08 | control-if | if/else, if-with-init |
| 09 | control-switch | switch, fallthrough, type switch |
| 10 | loops | for, range, break/continue |
| 11 | arrays-slices | Fixed arrays vs slices, len/cap |
| 12 | slices-advanced | append, copy, slicing internals |
| 13 | maps | CRUD, comma-ok idiom, iteration |
| 14 | strings-runes | Immutability, UTF-8, rune iteration |
| 15 | errors-basics | error interface, errors.New, error returns |
| 16 | review-1 | Spaced repetition: mix of 01–15 |
Projects
Build Go's object model: structs, methods, interfaces, pointers, error wrapping, defer/panic/recover, packages, and I/O interfaces.
| # | Exercise | Concept |
|---|---|---|
| 01 | structs-basics | Struct definition, field access, initialization |
| 02 | structs-methods | Value vs pointer receivers |
| 03 | structs-embedding | Composition over inheritance |
| 04 | interfaces-basics | Interface definition, implicit satisfaction |
| 05 | interfaces-polymorphism | Polymorphic dispatch |
| 06 | type-assertions | Type assertions, type switches |
| 07 | errors-custom | Custom error types, sentinel errors |
| 08 | errors-wrapping | %w, errors.Is, errors.As |
| 09 | pointers-basics | &, *, nil pointers |
| 10 | pointers-vs-values | When to use pointer vs value receivers |
| 11 | defer-panic-recover | Defer ordering, panic/recover pattern |
| 12 | packages-design | Visibility, init(), package naming |
| 13 | modules-management | go.mod, versioning, go get |
| 14 | io-interfaces | io.Reader, io.Writer, composing I/O |
| 15 | goroutines-preview | Conceptual goroutine intro |
| 16 | review-2a | Mix of exercises 01–08 |
| 17 | review-2b | Mix of exercises 09–15 |
| 18 | review-2-hard | Interleaved, application level |
Projects
Master Go's concurrency primitives: goroutines, channels, select, worker pools, pipelines, context cancellation, sync primitives, and generics.
| # | Exercise | Concept |
|---|---|---|
| 01 | goroutines-lifecycle | Creation, goroutine leaks, WaitGroup |
| 02 | channels-unbuffered | Send/receive synchronization |
| 03 | channels-buffered | Buffer semantics, deadlock avoidance |
| 04 | select-statement | Multiplexing channels, default case |
| 05 | worker-pool | Fixed goroutine pool pattern |
| 06 | fan-out-fan-in | Distributing and merging work |
| 07 | pipeline | Staged data transformation |
| 08 | context-cancellation | context.WithCancel, WithTimeout |
| 09 | sync-mutex | sync.Mutex, RWMutex |
| 10 | sync-atomic | sync/atomic operations |
| 11 | sync-waitgroup | sync.WaitGroup patterns |
| 12 | race-conditions | -race flag, detecting data races |
| 13 | generics-basics | Type parameters, constraints (Go 1.18+) |
| 14 | reflection-basics | reflect package, use cases |
| 15 | review-3 | Concurrency patterns interleaved |
Projects
Production-ready Go: testing strategies, benchmarks, HTTP middleware, database patterns, build tooling, and performance profiling.
| # | Exercise | Concept |
|---|---|---|
| 01 | testing-unit | testing package, subtests, t.Run |
| 02 | testing-table-driven | Table-driven test patterns |
| 03 | testing-benchmarks | Benchmark*, pprof integration |
| 04 | testing-mocks | Interface-based mocking |
| 05 | http-middleware | Middleware chaining pattern |
| 06 | database-patterns | database/sql, prepared statements |
| 07 | build-tags | Build constraints, cross-compilation |
| 08 | unsafe-cgo | unsafe awareness, cgo basics |
| 09 | performance-profiling | Escape analysis, GC tuning, pprof |
| 10 | review-4-final | Full interleave — all phases |
Projects
# Clone and enter the repo $ git clone https://github.com/davidnbr/go_journey.git && cd go_journey # Run a single exercise $ make check PHASE=phase1-foundations EX=01-hello-world $ make check EX=1.1 # Run all tests for a phase $ make test-phase PHASE=phase1-foundations $ make test-phase PHASE=1 # Check overall progress $ make progress