
Golang Testing
The golang-testing skill provides Go developers with comprehensive testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage analysis, following test-driven development (TDD) methodology and idiomatic Go practices. It solves the problem of writing reliable, maintainable tests by offering step-by-step TDD workflows, code examples, and standardized patterns that developers can apply when writing new Go functions, adding coverage to existing code, or implementing performance benchmarks. The skill is designed for Go developers at any level who want to follow best practices and improve code quality through systematic testing.
- skills.sh installs
- 8.4K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill golang-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Go Testing Patterns
Comprehensive Go testing patterns for writing reliable, maintainable tests following TDD methodology.
When to Activate
- Writing new Go functions or methods
- Adding test coverage to existing code
- Creating benchmarks for performance-critical code
- Implementing fuzz tests for input validation
- Following TDD workflow in Go projects
TDD Workflow for Go
The RED-GREEN-REFACTOR Cycle
RED → Write a failing test first
GREEN → Write minimal code to pass the test
REFACTOR → Improve code while keeping tests green
REPEAT → Continue with next requirement
Step-by-Step TDD in Go
// Step 1: Define the interface/signature
// calculator.go
package calculator
func Add(a, b int) int {
panic("not implemented") // Placeholder
}
// Step 2: Write failing test (RED)
// calculator_test.go
package calculator
import "testing"
func TestAdd(t *testing.T) {
got := Add(2, 3)
want := 5
if got != want {
t.Errorf("Add(2, 3) = %d; want %d", got, want)
}
}
// Step 3: Run test - verify FAIL
// $ go test
// --- FAIL: TestAdd (0.00s)
// panic: not implemented
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Categories
- Testing & QA, Go
More from affaan-m/everything-claude-code
All 256- Springboot Patterns7.7K
- Continuous Learning V27.5K
- Postgres Patterns7.1K
- Django Patterns7K
- Frontend Slides7K
- Python Patterns7K
- Api Design6.9K
- Tdd Workflow6.9K
- Docker Patterns6.8K
- Java Coding Standards6.6K
- Python Testing6.6K
- Video Editing6.6K
- Django Security6.5K
- Springboot Security6.4K
- Article Writing6.3K
- Prompt Optimizer6.3K
- Cpp Coding Standards6.2K
- Market Research6.2K
- Strategic Compact6.1K
- Android Clean Architecture6K
- Springboot Tdd6K
- Continuous Learning5.9K
- Database Migrations5.9K
- Django Tdd5.9K