Colophon
About this reference
The full 23-pattern Gang of Four catalog plus 8 agentic patterns, written for engineers who already know Go and want the tradeoffs, not the class diagram. Every example lives in a real module, uses the standard library only, and is executed with the race detector on every change.
source
Real Go, not pseudo-code
Every snippet is imported from src/code at build time. If it appears on the page, it compiles.
ci
gofmt, vet, staticcheck, race
Each example is run with the race detector in CI on every change. Standard library only — no third-party deps.
privacy
Local-first progress
Reading state and roadmap ticks live in IndexedDB on your device. No account, no sync, no tracking.
domain
One consistent domain
Orders, carts and catalogs across all 31 patterns, so you compare the pattern rather than re-learning the scenario.
Stack
What each pattern page includes
The Problem
A concrete scenario where the pattern is needed.
The Solution
How the pattern translates into Go.
Structure
A diagram that steps through the participants one at a time, with source view, copy and fullscreen.
Implementation
The complete Go files from src/code, as tabs.
Pros and Cons
The advantages, disadvantages and tradeoffs of the pattern.
When to Use / When NOT to Use
Practical guidance on applicability, plus links to related patterns.
How the patterns are organized
Creational
5 patternsPatterns for object creation in Go, usually expressed through constructor functions, interfaces, and functional options.
Structural
7 patternsPatterns for composing types and boundaries in Go with interfaces, embedding, adapters, and focused packages.
Behavioral
11 patternsPatterns for organizing control flow, workflows, and collaboration with explicit errors, interfaces, and small units of behavior.
Agentic
8 patternsPatterns for building AI agent systems in Go: reasoning loops, tool dispatch, memory, retrieval, and multi-agent coordination.