Course
Go for Production Services
Go as it earns its keep on a real service: package layout, error discipline, goroutines that don't leak, net/http with actual timeouts, context, table-driven tests, and pprof when things get slow.
Layout, Errors, and Context: the Plumbing
Project structure that scales, error handling that survives 3am, and context for cancellation and deadlines.
- 01A Go Project Layout That Scales Past main.goWhere code goes when a service outgrows one file: cmd/, internal/, and why Go's compiler enforces your boundaries.20mOpen
- 02Error Handling Discipline: Wrap, Check, Return OnceSentinel errors, %w wrapping, errors.Is/As, and the one rule that stops double-logged, context-free failures.25mOpen
- 03Context: Cancellation, Deadlines, and Request ScopeHow ctx flows through a request, why every WithTimeout needs its cancel, and what context.Value is actually for.25mMembers
Concurrency and HTTP in Anger
Goroutines and channels without leaks, a hardened net/http server, and graceful shutdown with sane config.
- 01Goroutines and Channels Without the LeaksEvery goroutine needs an owner and an exit path — the send-blocked leak, errgroup fan-out, and bounded worker pools.30mMembers
- 02net/http Services: Handlers, Middleware, and Real Timeoutshttp.ListenAndServe ships with zero timeouts. Build an http.Server deliberately, and never trust the default http.Client.30mMembers
- 03Graceful Shutdown and Boring, Correct Configsignal.NotifyContext, srv.Shutdown, draining workers, env-based config, and health endpoints that tell the truth.25mMembers
Test It, Profile It, Run It
Table-driven tests and httptest, pprof on a live service, then logging, metrics, and shipping safely.
- 01Table-Driven Tests and httptest: Go's Testing IdiomsOne test function, a table of cases, real HTTP round-trips with httptest.NewServer — and -race in CI, always.30mPremium
- 02Profiling a Live Service with pprofCPU, heap, and goroutine profiles from a running process — plus why /debug/pprof must never face the internet.35mPremium
- 03Running It: Structured Logs, Metrics, and Ship-Safe Buildsslog for logs you can query, RED metrics that don't explode cardinality, govulncheck, and container-aware builds.30mPremium