794 lines, 35+ patterns across 9 topics with hyperlinked sources.
Includes frequency data from the source (281 interfaces, 55 sentinels,
262 constructors, 309 context-accepting functions, 2685 t.Helper calls).
Topics: interfaces, errors, testing, packages, concurrency,
documentation, naming, configuration, extension, performance, smells.
All examples are real code from the Go source, not invented.
Using codebase-analysis skill (patterns mode) on the language source.
Real examples from the repo, not invented. Each pattern has:
- Rule, Example, Why, When NOT to use, Source file.
Topics: interface design, error handling, testing, package org,
concurrency, documentation, naming, smells.
How CockroachDB, Prometheus, Ecto, and Oban handle the
things that touch everything but belong nowhere. Includes
red flags and review questions for each concern.
Not just per-file patterns — structural analysis of how these
codebases organize at scale. Key findings:
- 116 packages @ 4 files each (CockroachDB)
- Interface layer breaks circular deps
- Testability designed in, not bolted on
- Composition via data, not inheritance