golang-testing
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
Skill by sazardev
Chalk Labs
Need help deploying golang-testing?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sazardev-golang-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
golang-testing- Description
- Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.
- License
- MIT
- Instructions
- 716 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 716 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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
```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
// Step 4: Implement minimal code (GREEN)
func Add(a, b int) int {
return a + b
}
// Step 5: Run test - verify PASS
// $ go test
// PASS
// Step 6: Refactor if needed, verify tests still pass
```
## Table-Driven Tests
The standard pattern for Go tests. Enables comprehensive coverage with minimal code.
```go
func TestAdd(t *testing.T) {
tests := []struct {
name string
a, b int
expected int
}{
{"positive numbers", 2, 3, 5},
{"negative numbers", -1, -2, -3},
{"zero values", 0, 0, 0},
{"mixed signs", -1, 1, 0},
{"large numbers", 1000000, 2000000, 3000000},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := Add(tt.a, tt.b)
if got != tt.expected {
t.Errorf("Add(%d, %d) = %d; want %d",
tt.a, tt.b, got, tt.expected)
}
})
}
}
```
### Table-Driven Tests with Error Cases
```go
func TestParseConfig(t *testing.T) {
tests := []struct {
name string
input string
want *Config
wantErr bool
}{
{
name: "valid config",
input: `{"host": "localhost", "port": 8080}`,
want: &Config{Host: "localhost", Port: 8080},
},
{
name: "invalid JSON",
input: `{invalid}`,
wantErr: true,
},
{
name: "empty input",
input: "",
wantErr: true,From sazardev/goca, MIT.
More from sazardev/goca
- 0.683score
ddd-teaching-skill
sazardev
Enseña Domain-Driven Design y Clean Architecture de forma guiada usando Goca CLI.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman-commit
sazardev
Ultra-compressed commit message generator.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman
sazardev
Ultra-compressed communication mode.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
goca-helper-skill
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
mcp-tools
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
codegen-testing
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
goca-architecture
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9
Signals
- Stars
- 304
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- May 25, 2026 (5 months ago)
- Last release
- Jul 12, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sazardev/goca
- Website
- sazardev.github.io/goca/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.399score
golang-testing
vibeeval
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
SkillDFreshness: D★ 540Claude Code +9 - 0.301score
golang-testing
ViewWay
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
SkillCFreshness: C★ 3Claude Code +9 - 0.289score
golang-testing
Luohaothu
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
SkillDFreshness: D★ 26Claude Code +9 - 0.271score
golang-testing
chaitin
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
SkillDFreshness: D★ 7Claude Code +9
More from sazardev
- 0.683score
ddd-teaching-skill
sazardev
Enseña Domain-Driven Design y Clean Architecture de forma guiada usando Goca CLI.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman
sazardev
Ultra-compressed communication mode.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman-commit
sazardev
Ultra-compressed commit message generator.
SkillCFreshness: C★ 304Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get golang-testing running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
golang-testing skill. Agent Mart. https://agentmart.dev/skills/sazardev-golang-testing (last updated 2026-10-24)