go№33
Go, zero to seniorGO
A small language for big systems — types, errors, interfaces, and concurrency that actually scales.
- units
- 14
- lessons
- 48
- hours
- ~14
00
Start from zero
Before the senior material: what Go is for, how you run anything at all, and the one habit — errors as values — the rest of the track assumes you already own.01
Types, errors, interfaces
Go's whole design is explicitness: values over references, errors as values, interfaces satisfied implicitly.02
Goroutines, channels, the memory model
Goroutines are cheap because the runtime schedules them; channels and the memory model are the safety contract.03
HTTP services with the stdlib
net/http is a production framework: routing since 1.22, middleware as wrappers, and timeouts you must set yourself — or leak connections.01net/http as the framework: Handler, the 1.22 ServeMux, and routing without dependencies17 min02Middleware patterns: chaining, ordering, context, and the ResponseWriter wrapping traps18 min03Timeouts and limits: the zero values that hold connections forever19 min04Graceful shutdown: Shutdown(ctx), SIGTERM wiring, and why deploys still drop requests18 min
04
Testing and the Go toolchain
Table tests are the idiom, fuzzing and benchmarks are built in, and the toolchain (vet, race, pprof hooks) is half the language's value.01Table tests and subtests: cases as data, t.Run, and why Go ships no assert library17 min02Fuzzing and benchmarks: coverage-guided inputs, b.Loop, and benchstat honesty19 min03Mocks, fakes, and interfaces: test doubles without testing the double18 min04Modules and tooling: MVS, go.sum, workspaces, and the CI toolchain16 min
05
Generics and package design
Generics remove copy-paste, not interfaces: constraints are type sets, instantiation is compile-time, and most code still wants an interface.01Type parameters and constraints: type sets, inference limits, and GCShape stenciling18 min02When generics, when interfaces: the decision senior reviewers actually make17 min03Package design: names as API, internal/, dependency direction, and the cycle that blocks your hotfix19 min04Errors as API: sentinels, types, the Is/As contract, and the %w that leaks your internals18 min
06
Runtime, GC, and profiling
Go's GC trades throughput for sub-millisecond pauses; escape analysis decides stack vs heap, and pprof tells you which myth you believed.01Memory and escape analysis: who decides stack vs heap, and what an allocation really costs18 min02GC mechanics and tuning: tri-color mark-sweep, the pacer, GOGC and GOMEMLIMIT without myths19 min03pprof end to end: CPU, heap, goroutine and mutex profiles from a live service to the leak19 min04Benchmarking real services: percentiles, coordinated omission, and the optimization loop18 min
07
Production patterns
Production Go is discipline: context flows down every call, config is explicit, logs are structured slog, retries respect budgets.01Context discipline: cancellation, deadlines, and values that flow down the call chain18 min02Configuration without magic: env, flags, files, and a typed Config that fails at boot17 min03Structured logging with slog: handlers, attrs, levels, and the price of every line18 min04Retries and resilience: jittered backoff, retry budgets, and circuit breakers19 min
08
Data access: database/sql and beyond
database/sql is a pool, not a connection: misSized pools starve under load, transactions pin connections, sqlc generates the boring code.09
gRPC and API contracts
gRPC is a contract compiler: protobuf schemas version by addition only, breaking changes need new fields, gateways translate to REST.01gRPC and protobuf: the compiled contract, HTTP/2 transport, and the balancer that ignored your new pods19 min02Contract versioning: evolve by addition, reserve dead tags, let buf breaking guard the wire17 min03Gateways and REST: google.api.http annotations, transcoding limits, gRPC-Web, and the ConnectRPC alternative17 min
10
Advanced concurrency
errgroup propagates the first error and cancels siblings; pipelines must die on context cancel or leak goroutines; backpressure beats buffers.01errgroup as structured concurrency: scoped goroutines, first-error cancellation, and SetLimit18 min02Pipelines under cancellation: guarded sends, closing discipline, and the canonical goroutine leak18 min03Semaphores and backpressure: bounding work at every boundary before the queue becomes the outage17 min04Deadlock postmortems: lock-order inversion, channel-under-mutex, and reading the goroutine dump19 min
11
Security and the supply chain
Use crypto from the stdlib and nothing clever: constant-time compares, real randomness, govulncheck in CI, minimal images by default.01Crypto from the stdlib, used correctly: argon2 for passwords, constant-time compares, and the GCM nonce invariant19 min02govulncheck and dependency hygiene: symbol reachability, go.sum integrity, and MVS without surprise upgrades17 min03Minimal container images for Go: the attack-surface ladder from ubuntu to scratch via multi-stage builds18 min
12
Deployment and operations
A Go binary is the deploy artifact: static linking and cross-compilation, scratch containers, health probes wired to real readiness.01Static binaries and cross-compilation: CGO_ENABLED=0, the missing ld-linux mystery, and build-flag discipline18 min02Containers for Go: GOMAXPROCS vs CPU quota, GOMEMLIMIT vs OOM, and the multi-stage Dockerfile that caches right18 min03Healthchecks and lifecycle: liveness vs readiness vs startup, and the shutdown sequence that drops zero requests18 min
13
Systems programming projects
Go is a systems glue language: CLI tools with honest exit codes, daemons under systemd, processes, files and locks done right.01CLI tools in Go: stdout is data, stderr is diagnostics, exit codes are the API18 min02Daemons and signals: no fork dance, the SIGTERM contract, signal.NotifyContext as the one shutdown path17 min03OS integration: os/exec without injection, atomic rename, advisory locks, fsnotify, and go:embed19 min
Build with this track
Guided projects that exercise what you learn here.
Docker, containers as a system
Past 'write a Dockerfile' into how images, namespaces, BuildKit and registries actually work — and how containers behave in production.