go-testing

Installation
SKILL.md

Go Testing

Quick Reference

Pattern Use When
t.Error Default — report failure, keep running
t.Fatal Setup failed or continuing is meaningless
cmp.Diff Comparing structs, slices, maps, protos
Table-driven Many cases share identical logic
Subtests Need filtering, parallel execution, or naming
t.Helper() Any test helper function (call as first statement)
t.Cleanup() Teardown in helpers instead of defer

Useful Test Failures

Related skills

More from cxuu/golang-skills

Installs
618
GitHub Stars
91
First Seen
Jan 27, 2026