Go Fundamentals
The parts of Go's type system, slices, maps, strings, methods and modules that working engineers still get wrong β with the production consequences.
Interfaces & Composition
Implicit interfaces, interface values and the nil trap, type assertions, embedding, and "accept interfaces, return structs" β applied to payment gateways and streaming I/O.
Error Handling
Errors as values, wrapping with %w, errors.Is/As/Join, domain errors for payments, panic/recover boundaries, and mapping errors to HTTP/gRPC codes while logging each error once.
Generics
Type parameters, constraints, the ~ tilde, comparable, generic Set and Cache types, the slices/maps/cmp packages, range-over-func iterators β and when generics make code worse.
Goroutines & Channels
How goroutines are scheduled (G-M-P), unbuffered vs buffered channels, select, closing rules, nil channels, and how to find and prevent goroutine leaks.
sync, atomic & context
Mutexes, WaitGroup, Once, sync.Map, Pool, Cond, atomic types, context cancellation/deadlines/values, errgroup and semaphores β with the rules that keep payment code race-free.
Concurrency Patterns
Worker pools, pipelines, fan-out/fan-in, bounded parallelism, rate limiting with x/time/rate, singleflight, in-process pub/sub and graceful shutdown β each as production-ready Go.
Memory, GC & Escape Analysis
Stack vs heap, reading escape analysis output, how Go's concurrent GC works and is tuned (GOGC, GOMEMLIMIT, Green Tea), reducing allocations, struct layout, and the Go memory model's happens-before rules.
Testing & Benchmarking
Table-driven tests, subtests and t.Parallel, httptest, fakes vs mocks, testcontainers-go, testing/synctest, fuzzing, benchmarks with b.Loop and benchstat, the race detector, coverage and golden files.
Project Layout & Clean Architecture in Go
How to lay out a Go module (cmd/, internal/, the pkg/ debate), apply hexagonal architecture to a payments service with hand-written dependency injection, load configuration safely, and choose monorepo vs polyrepo.
Building Production Services
A production-grade Go service end to end β Go 1.22 ServeMux routing, middleware, validation and JSON, pgx pools and a retrying transaction helper, gRPC, slog, OpenTelemetry, health probes, graceful shutdown and a distroless Docker image.
Profiling & Performance
A disciplined workflow for Go performance β pprof CPU/heap/goroutine/block/mutex profiles, flame graphs, go tool trace and the flight recorder, profile-guided optimization, common fixes, and benchmarking you can trust.
Common Pitfalls
Twenty-six Go mistakes that reach production in banking and e-commerce code β nil maps, slice aliasing, defer traps, loop variables, typed nils, float money, JSON precision, timer leaks, mutex copies, missing timeouts and more β each with its symptom and fix.
Hands-on Go Labs
Fifteen test-driven Go labs (rate limiter, consistent hashing, idempotency keys, double-entry ledger, inventory CAS, saga, snowflake IDs, a RAG vector index, an LLM gateway and more) that turn system-design concepts into code you write and verify yourself.