
Go Testing
This teaches you to write Go tests the way Google and Uber do: table-driven tests with subtests, proper use of t.Error versus t.Fatal, and cmp.Diff for comparing complex types instead of assertion libraries. The normative guidance is opinionated but practical, like always printing "got" before "want" and never comparing error strings when you could check semantics with errors.Is. It includes a script to generate table test scaffolds and covers helpers, cleanup, and parallel execution. The "useful test failures" section nails something most guides skip: your error messages should be diagnosable without opening the source file.
- skills.sh installs
- 1.4K
- GitHub stars
- 193
- last updated
- Aug 21, 2026
Install
$ npx -y skills add cxuu/golang-skills --skill go-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Go Testing
Compatibility: Diff examples may use
github.com/google/go-cmp.
Resource Routing
scripts/gen-table-test.sh- Run when generating a table-driven test scaffold.assets/table-test-template.go- Use as a copyable table-test starting point.references/TABLE-DRIVEN-TESTS.md- Read when choosing table tests, subtests, or parallel test patterns.references/TEST-HELPERS.md- Read when writing helpers, fixtures, cleanup, or test doubles.references/TEST-ORGANIZATION.md- Read when structuring packages, black-box tests, or larger test suites.references/VALIDATION-APIS.md- Read when choosingt.Error,t.Fatal,cmp.Diff, or assertion style.references/INTEGRATION.md- Read when testing external services, HTTP handlers, databases, or long-running setup.
Quick Reference
Sponsors
Details
- Repository
- github.com/cxuu/golang-skills
- Categories
- Testing & QA, Git & Pull Requests, Documentation, Debugging, Automation & Workflows, Go
- First seen
- May 16, 2026
More from cxuu/golang-skills
All 20- Go Error Handling1.3K
- Go Linting1.3K
- Go Concurrency1.3K
- Go Interfaces1.3K
- Go Documentation1.3K
- Go Style Core1.3K
- Go Performance1.3K
- Go Context1.3K
- Go Naming1.3K
- Go Defensive1.3K
- Go Packages1.3K
- Go Data Structures1.3K
- Go Functional Options1.3K
- Go Control Flow1.3K
- Go Logging1.1K
- Go Functions1.1K
- Go Generics1.1K
- Go Declarations1.1K
- Go Code Review1.8K