Series · GO

Advanced Go Patterns

The idioms, tradeoffs, and footguns that separate code that compiles from code that reads like it was written by someone who's shipped a lot of Go. Code-first, real snippets.

  • 11 parts
  • 62 min end to end
  • 8 sections
  • Latest Jun 20, 2026

Contents

  1. 01Functional OptionsConstructors that stay clean as your config grows.API Design · 5 min
  2. 02Interface DesignAccept interfaces, return structs, and keep them small.API Design · 6 min
  3. 03Error HandlingWrapping, sentinels, errors.Is/As, and custom error types.Errors · 5 min
  4. 04Concurrency PatternsPipelines, fan-in/fan-out, and worker pools done right.Concurrency · 6 min
  5. 05ContextCancellation, deadlines, propagation, and the values trap.Concurrency · 5 min
  6. 06Synchronization Beyond Channelserrgroup, semaphores, singleflight, and the sync toolbox.Concurrency · 6 min
  7. 07GenericsConstraints, inference, and when not to reach for them.Types · 5 min
  8. 08Performance & MemoryEscape analysis, sync.Pool, allocations, and profiling.Performance · 5 min
  9. 09Resiliency PatternsRetries, backoff, circuit breakers, timeouts, and bulkheads.Resiliency · 6 min
  10. 10gRPC PatternsInterceptors, streaming, deadlines, and idiomatic errors.RPC · 6 min
  11. 11Background Workers & Job ProcessingDurable, observable background work on top of the concurrency and resiliency primitives you've already learned.Background · 7 min