go-test-table-driven

Installation
SKILL.md

Go Table-Driven Tests

Table-driven tests are a powerful Go idiom — when used correctly. Most codebases either underuse them (10 copy-paste tests) or overuse them (complex branching logic in a 200-line struct). This skill covers the sweet spot.

Community default. A project skill or agent-config rule that explicitly supersedes go-test-table-driven takes precedence over this one.

Detailed reference material, loaded on demand:

  • references/patterns.md — full worked examples: canonical tables, wantErr/wantErrIs, parallel tables, map-based tables, error-only tables, struct alignment for readability.
  • references/refactoring.md — recognizing bloated tables and rewriting them as explicit subtests, with before/after examples.
Installs
163
GitHub Stars
82
First Seen
Mar 27, 2026