OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add affaan-m/ecc --skill golang-testing
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices. Use when writing Go tests — table-driven cases, subtests, benchmarks, fuzzing, or coverage.
npx skills add affaan-m/ecc --skill golang-testing
Comprehensive Go testing patterns for writing reliable, maintainable tests following TDD methodology.
The standard pattern for Go tests. Enables comprehensive coverage with minimal code.
Testing against expected output files stored in testdata/.
| Code Type | Target |
|---|---|
| Critical business logic | 100% |
| Public APIs | 90%+ |
| General code | 80%+ |
| Generated code | Exclude |
DO:
t.Helper() in helper functionst.Parallel() for independent testst.Cleanup()DON'T:
time.Sleep() in tests (use channels or conditions)Remember: Tests are documentation. They show how your code is meant to be used. Write them clearly and keep them up to date.