{"id":"8e952a60-871d-40ae-9a8c-f7e75c196562","shortId":"be9bYN","kind":"skill","title":"golang-testing","tagline":"Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testin","description":"**Persona:** You are a Go engineer who treats tests as executable specifications. You write tests to constrain behavior, not to hit coverage targets.\n\n**Thinking mode:** Use `ultrathink` for test strategy design and failure analysis. Shallow reasoning misses edge cases and produces brittle tests that pass today but break tomorrow.\n\n**Modes:**\n\n- **Write mode** — generating new tests for existing or new code. Work sequentially through the code under test; use `gotests` to scaffold table-driven tests, then enrich with edge cases and error paths.\n- **Review mode** — reviewing a PR's test changes. Focus on the diff: check coverage of new behaviour, assertion quality, table-driven structure, and absence of flakiness patterns. Sequential.\n- **Audit mode** — auditing an existing test suite for gaps, flakiness, or bad patterns (order-dependent tests, missing `t.Parallel()`, implementation-detail coupling). Launch up to 3 parallel sub-agents split by concern: (1) unit test quality and coverage gaps, (2) integration test isolation and build tags, (3) goroutine leaks and race conditions.\n- **Debug mode** — a test is failing or flaky. Work sequentially: reproduce reliably, isolate the failing assertion, trace the root cause in production code or test setup.\n\n> **Community default.** A company skill that explicitly supersedes `samber/cc-skills-golang@golang-testing` skill takes precedence.\n\n# Go Testing Best Practices\n\nThis skill guides the creation of production-ready tests for Go applications. Follow these principles to write maintainable, fast, and reliable tests.\n\n## Best Practices Summary\n\n1. Table-driven tests MUST use named subtests -- every test case needs a `name` field passed to `t.Run`\n2. Integration tests MUST use build tags (`//go:build integration`) to separate from unit tests\n3. Tests MUST NOT depend on execution order -- each test MUST be independently runnable\n4. Independent tests SHOULD use `t.Parallel()` when possible\n5. NEVER test implementation details -- test observable behavior and public API contracts\n6. Packages with goroutines SHOULD use `goleak.VerifyTestMain` in `TestMain` to detect goroutine leaks\n7. Use testify as helpers, not a replacement for standard library\n8. Mock interfaces, not concrete types\n9. Keep unit tests fast (< 1ms), use build tags for integration tests\n10. Run tests with race detection in CI\n11. Include examples as executable documentation\n\n## Test Structure and Organization\n\n### File Conventions\n\n```go\n// package_test.go - tests in same package (white-box, access unexported)\npackage mypackage\n\n// mypackage_test.go - tests in test package (black-box, public API only)\npackage mypackage_test\n```\n\n### Naming Conventions\n\n```go\nfunc TestAdd(t *testing.T) { ... }              // function test\nfunc TestMyStruct_MyMethod(t *testing.T) { ... } // method test\nfunc BenchmarkAdd(b *testing.B) { ... }          // benchmark\nfunc ExampleAdd() { ... }                        // example\n```\n\n## Table-Driven Tests\n\nTable-driven tests are the idiomatic Go way to test multiple scenarios. Always name each test case.\n\n```go\nfunc TestCalculatePrice(t *testing.T) {\n    tests := []struct {\n        name     string\n        quantity int\n        unitPrice float64\n        expected  float64\n    }{\n        {\n            name:      \"single item\",\n            quantity:  1,\n            unitPrice: 10.0,\n            expected:  10.0,\n        },\n        {\n            name:      \"bulk discount - 100 items\",\n            quantity:  100,\n            unitPrice: 10.0,\n            expected:  900.0, // 10% discount\n        },\n        {\n            name:      \"zero quantity\",\n            quantity:  0,\n            unitPrice: 10.0,\n            expected:  0.0,\n        },\n    }\n\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            got := CalculatePrice(tt.quantity, tt.unitPrice)\n            if got != tt.expected {\n                t.Errorf(\"CalculatePrice(%d, %.2f) = %.2f, want %.2f\",\n                    tt.quantity, tt.unitPrice, got, tt.expected)\n            }\n        })\n    }\n}\n```\n\n## Unit Tests\n\nUnit tests should be fast (< 1ms), isolated (no external dependencies), and deterministic.\n\n## Testing HTTP Handlers\n\nUse `httptest` for handler tests with table-driven patterns. See [HTTP Testing](./references/http-testing.md) for examples with request/response bodies, query parameters, headers, and status code assertions.\n\n## Goroutine Leak Detection with goleak\n\nUse `go.uber.org/goleak` to detect leaking goroutines, especially for concurrent code:\n\n```go\nimport (\n    \"testing\"\n    \"go.uber.org/goleak\"\n)\n\nfunc TestMain(m *testing.M) {\n    goleak.VerifyTestMain(m)\n}\n```\n\nTo exclude specific goroutine stacks (for known leaks or library goroutines):\n\n```go\nfunc TestMain(m *testing.M) {\n    goleak.VerifyTestMain(m,\n        goleak.IgnoreCurrent(),\n    )\n}\n```\n\nOr per-test:\n\n```go\nfunc TestWorkerPool(t *testing.T) {\n    defer goleak.VerifyNone(t)\n    // ... test code ...\n}\n```\n\n## testing/synctest for Deterministic Goroutine Testing\n\n> **Experimental:** `testing/synctest` is not yet covered by Go's compatibility guarantee. Its API may change in future releases. For stable alternatives, use `clockwork` (see [Mocking](./references/mocking.md)).\n\n`testing/synctest` (Go 1.24+) provides deterministic time for concurrent code testing. Time advances only when all goroutines are blocked, making ordering predictable.\n\nWhen to use `synctest` instead of real time:\n\n- Testing concurrent code with time-based operations (time.Sleep, time.After, time.Ticker)\n- When race conditions need to be reproducible\n- When tests are flaky due to timing issues\n\n```go\nimport (\n    \"testing\"\n    \"time\"\n    \"testing/synctest\"\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestChannelTimeout(t *testing.T) {\n    synctest.Run(func(t *testing.T) {\n        is := assert.New(t)\n\n        ch := make(chan int, 1)\n        go func() {\n            time.Sleep(50 * time.Millisecond)\n            ch <- 42\n        }()\n\n        select {\n        case v := <-ch:\n            is.Equal(42, v)\n        case <-time.After(100 * time.Millisecond):\n            t.Fatal(\"timeout occurred\")\n        }\n    })\n}\n```\n\nKey differences in `synctest`:\n\n- `time.Sleep` advances synthetic time instantly when the goroutine blocks\n- `time.After` fires when synthetic time reaches the duration\n- All goroutines run to blocking points before time advances\n- Test execution is deterministic and repeatable\n\n## Test Timeouts\n\nFor tests that may hang, use a timeout helper that panics with caller location. See [Helpers](./references/helpers.md).\n\n## Benchmarks\n\n→ See `samber/cc-skills-golang@golang-benchmark` skill for advanced benchmarking: `b.Loop()` (Go 1.24+), `benchstat`, profiling from benchmarks, and CI regression detection.\n\nWrite benchmarks to measure performance and detect regressions:\n\n```go\nfunc BenchmarkStringConcatenation(b *testing.B) {\n    b.Run(\"plus-operator\", func(b *testing.B) {\n        for i := 0; i < b.N; i++ {\n            result := \"a\" + \"b\" + \"c\"\n            _ = result\n        }\n    })\n\n    b.Run(\"strings.Builder\", func(b *testing.B) {\n        for i := 0; i < b.N; i++ {\n            var builder strings.Builder\n            builder.WriteString(\"a\")\n            builder.WriteString(\"b\")\n            builder.WriteString(\"c\")\n            _ = builder.String()\n        }\n    })\n}\n```\n\nBenchmarks with different input sizes:\n\n```go\nfunc BenchmarkFibonacci(b *testing.B) {\n    sizes := []int{10, 20, 30}\n    for _, size := range sizes {\n        b.Run(fmt.Sprintf(\"n=%d\", size), func(b *testing.B) {\n            b.ReportAllocs()\n            for i := 0; i < b.N; i++ {\n                Fibonacci(size)\n            }\n        })\n    }\n}\n```\n\n## Parallel Tests\n\nUse `t.Parallel()` to run tests concurrently:\n\n```go\nfunc TestParallelOperations(t *testing.T) {\n    tests := []struct {\n        name string\n        data []byte\n    }{\n        {\"small data\", make([]byte, 1024)},\n        {\"medium data\", make([]byte, 1024*1024)},\n    }\n\n    for _, tt := range tests {\n        t.Run(tt.name, func(t *testing.T) {\n            t.Parallel()\n            is := assert.New(t)\n\n            result := Process(tt.data)\n            is.NotNil(result)\n        })\n    }\n}\n```\n\n## Fuzzing\n\nUse fuzzing to find edge cases and bugs:\n\n```go\nfunc FuzzReverse(f *testing.F) {\n    f.Add(\"hello\")\n    f.Add(\"\")\n    f.Add(\"a\")\n\n    f.Fuzz(func(t *testing.T, input string) {\n        reversed := Reverse(input)\n        doubleReversed := Reverse(reversed)\n        if input != doubleReversed {\n            t.Errorf(\"Reverse(Reverse(%q)) = %q, want %q\", input, doubleReversed, input)\n        }\n    })\n}\n```\n\n## Examples as Documentation\n\nExamples are executable documentation verified by `go test`:\n\n```go\nfunc ExampleCalculatePrice() {\n    price := CalculatePrice(100, 10.0)\n    fmt.Printf(\"Price: %.2f\\n\", price)\n    // Output: Price: 900.00\n}\n\nfunc ExampleCalculatePrice_singleItem() {\n    price := CalculatePrice(1, 25.50)\n    fmt.Printf(\"Price: %.2f\\n\", price)\n    // Output: Price: 25.50\n}\n```\n\n## Code Coverage\n\n```bash\n# Generate coverage file\ngo test -coverprofile=coverage.out ./...\n\n# View coverage in HTML\ngo tool cover -html=coverage.out\n\n# Coverage by function\ngo tool cover -func=coverage.out\n\n# Total coverage percentage\ngo tool cover -func=coverage.out | grep total\n```\n\n## Integration Tests\n\nUse build tags to separate integration tests from unit tests:\n\n```go\n//go:build integration\n\npackage mypackage\n\nfunc TestDatabaseIntegration(t *testing.T) {\n    db, err := sql.Open(\"postgres\", os.Getenv(\"DATABASE_URL\"))\n    if err != nil {\n        t.Fatal(err)\n    }\n    defer db.Close()\n\n    // Test real database operations\n}\n```\n\nRun integration tests separately:\n\n```bash\ngo test -tags=integration ./...\n```\n\nFor Docker Compose fixtures, SQL schemas, and integration test suites, see [Integration Testing](./references/integration-testing.md).\n\n## Mocking\n\nMock interfaces, not concrete types. Define interfaces where consumed, then create mock implementations.\n\nFor mock patterns, test fixtures, and time mocking, see [Mocking](./references/mocking.md).\n\n## Enforce with Linters\n\nMany test best practices are enforced automatically by linters: `thelper`, `paralleltest`, `testifylint`. See the `samber/cc-skills-golang@golang-lint` skill for configuration and usage.\n\n## Cross-References\n\n- -> See `samber/cc-skills-golang@golang-stretchr-testify` skill for detailed testify API (assert, require, mock, suite)\n- -> See `samber/cc-skills-golang@golang-database` skill (testing.md) for database integration test patterns\n- -> See `samber/cc-skills-golang@golang-concurrency` skill for goroutine leak detection with goleak\n- -> See `samber/cc-skills-golang@golang-continuous-integration` skill for CI test configuration and GitHub Actions workflows\n- -> See `samber/cc-skills-golang@golang-lint` skill for testifylint and paralleltest configuration\n- -> See `samber/cc-skills-golang@golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\n\n## Quick Reference\n\n```bash\ngo test ./...                          # all tests\ngo test -run TestName ./...            # specific test by exact name\ngo test -run TestName/subtest ./...    # subtests within a test\ngo test -run 'Test(Add|Sub)' ./...     # multiple tests (regexp OR)\ngo test -run 'Test[A-Z]' ./...         # tests starting with capital letter\ngo test -run 'TestUser.*' ./...        # tests matching prefix\ngo test -run '.*Validation.*' ./...    # tests containing substring\ngo test -run TestName/. ./...          # all subtests of TestName\ngo test -run '/(unit|integration)' ./... # filter by subtest name\ngo test -race ./...                    # race detection\ngo test -cover ./...                   # coverage summary\ngo test -bench=. -benchmem ./...       # benchmarks\ngo test -fuzz=FuzzName ./...           # fuzzing\ngo test -tags=integration ./...        # integration tests\n```","tags":["golang","testing","skills","samber","agent","agent-skills","antigravity","claude","claude-code","code","codex","coding"],"capabilities":["skill","source-samber","skill-golang-testing","topic-agent","topic-agent-skills","topic-antigravity","topic-claude","topic-claude-code","topic-code","topic-codex","topic-coding","topic-copilot","topic-cursor","topic-gemini","topic-gemini-cli-extension"],"categories":["cc-skills-golang"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/samber/cc-skills-golang/golang-testing","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add samber/cc-skills-golang","source_repo":"https://github.com/samber/cc-skills-golang","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 1478 github stars · SKILL.md body (11,928 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-03T00:52:54.567Z","embedding":null,"createdAt":"2026-04-18T21:55:25.432Z","updatedAt":"2026-05-03T00:52:54.567Z","lastSeenAt":"2026-05-03T00:52:54.567Z","tsv":"'/go':306,1139 '/goleak':607,621 '/references/helpers.md':846 '/references/http-testing.md':586 '/references/integration-testing.md':1188 '/references/mocking.md':691,1213 '/stretchr/testify/assert':754 '0':524,890,906,950 '0.0':528 '1':189,280,502,770,1079 '1.24':694,859 '10':390,518,932 '10.0':504,506,515,526,1065 '100':510,513,787,1064 '1024':979,984,985 '11':398 '1ms':383,563 '2':196,299 '20':933 '25.50':1080,1088 '2f':548,549,551,1068,1083 '3':181,203,314 '30':934 '4':328 '42':777,783 '5':336 '50':774 '6':348 '7':361 '8':372 '9':378 '900.0':517 '900.00':1073 'a-z':1365 'absenc':150 'access':419 'action':1295 'add':1355 'advanc':703,797,821,855 'agent':185 'ai':1318 'ai-driven':1317 'altern':686 'alway':478 'analysi':76 'api':346,432,678,1253 'applic':266 'assert':143,224,598,1254 'assert.new':764,997 'audit':155,157 'autom':1316 'automat':1223 'b':455,879,886,896,902,916,928,945 'b.loop':857 'b.n':892,908,952 'b.reportallocs':947 'b.run':881,899,939 'bad':166 'base':727 'bash':1091,1170,1329 'behavior':60,343 'behaviour':142 'bench':1416 'benchmark':29,457,847,852,856,863,869,920,1418 'benchmarkadd':454 'benchmarkfibonacci':927 'benchmarkstringconcaten':878 'benchmem':1417 'benchstat':860 'best':252,277,1219 'black':429 'black-box':428 'block':709,804,817 'bodi':591 'box':418,430 'break':90 'brittl':84 'bug':1012 'build':201,304,307,385,1129,1140 'builder':911 'builder.string':919 'builder.writestring':913,915,917 'bulk':508 'byte':974,978,983 'c':897,918 'calculatepric':539,546,1063,1078 'caller':842 'capit':1371 'case':81,122,291,482,779,785,1010 'caus':228 'ch':766,776,781 'chan':768 'chang':133,680 'check':138 'ci':397,865,1290,1323 'clockwork':688 'code':30,102,107,231,597,615,660,700,723,1089,1320 'communiti':235 'compani':238 'compat':675 'compos':1177 'comprehens':6 'concern':188 'concret':376,1193 'concurr':614,699,722,963,1274 'condit':208,734 'configur':1237,1292,1307 'constrain':59 'consum':1198 'contain':1385 'continu':1286,1312 'contract':347 'convent':409,438 'coupl':177 'cover':15,671,1105,1113,1121,1411 'coverag':31,64,139,194,1090,1093,1100,1108,1117,1412 'coverage.out':1098,1107,1115,1123 'coverprofil':1097 'creat':1200 'creation':258 'cross':1241 'cross-refer':1240 'd':547,942 'data':973,976,981 'databas':1153,1164,1262,1266 'db':1148 'db.close':1161 'debug':209 'default':236 'defer':656,1160 'defin':1195 'depend':170,318,567 'design':73 'detail':176,340,1251 'detect':38,358,395,601,609,867,874,1279,1408 'determinist':569,663,696,825 'diff':137 'differ':793,922 'discount':509,519 'docker':1176 'document':403,1050,1054 'doublerevers':1032,1037,1046 'driven':18,116,147,283,463,467,581,1319 'due':743 'durat':812 'edg':80,121,1009 'enforc':1214,1222 'engin':48 'enrich':119 'err':1149,1156,1159 'error':124 'especi':612 'everi':289 'exact':1341 'exampl':400,460,588,1048,1051 'exampleadd':459 'examplecalculatepric':1061,1075 'exclud':629 'execut':53,320,402,823,1053 'exist':99,159 'expect':496,505,516,527 'experiment':666 'explicit':241 'extern':566 'f':1016 'f.add':1018,1020,1021 'f.fuzz':1023 'fail':214,223 'failur':75 'fast':273,382,562 'fibonacci':954 'field':295 'file':408,1094 'filter':1400 'find':1008 'fire':806 'fixtur':35,1178,1207 'flaki':152,164,216,742 'float64':495,497 'fmt.printf':1066,1081 'fmt.sprintf':940 'focus':134 'follow':267 'func':440,446,453,458,484,535,622,640,652,755,760,772,877,885,901,926,944,965,992,1014,1024,1060,1074,1114,1122,1144 'function':444,1110 'futur':682 'fuzz':34,1004,1006,1421,1423 'fuzznam':1422 'fuzzrevers':1015 'gap':163,195 'generat':95,1092 'github':1294 'github.com':753 'github.com/stretchr/testify/assert':752 'go':47,250,265,410,439,472,483,616,639,651,673,693,747,771,858,876,925,964,1013,1057,1059,1095,1103,1111,1119,1138,1171,1330,1334,1343,1351,1361,1373,1380,1387,1395,1404,1409,1414,1419,1424 'go.uber.org':606,620 'go.uber.org/goleak':605,619 'golang':2,13,245,851,1233,1246,1261,1273,1285,1300,1311 'golang-benchmark':850 'golang-concurr':1272 'golang-continuous-integr':1284,1310 'golang-databas':1260 'golang-lint':1232,1299 'golang-stretchr-testifi':1245 'golang-test':1,244 'goleak':40,603,1281 'goleak.ignorecurrent':646 'goleak.verifynone':657 'goleak.verifytestmain':354,626,644 'goroutin':36,204,351,359,599,611,631,638,664,707,803,814,1277 'got':538,543,554 'gotest':111 'grep':1124 'guarante':676 'guid':7,256 'guidelin':1326 'handler':572,576 'hang':834 'header':594 'hello':1019 'helper':365,838,845 'hit':63 'html':1102,1106 'http':571,584 'httptest':574 'idiomat':471 'implement':175,339,1202 'implementation-detail':174 'import':617,748 'includ':399 'independ':326,329 'input':923,1027,1031,1036,1045,1047 'instant':800 'instead':717 'int':493,769,931 'integr':27,197,300,308,388,1126,1133,1141,1167,1174,1182,1186,1267,1287,1313,1399,1427,1428 'interfac':374,1191,1196 'is.equal':782 'is.notnil':1002 'isol':199,221,564 'issu':746 'item':500,511 'keep':379 'key':792 'known':634 'launch':178 'leak':37,205,360,600,610,635,1278 'letter':1372 'librari':371,637 'lint':1234,1301 'linter':1216,1225 'locat':843 'm':624,627,642,645 'maintain':272 'make':710,767,977,982 'mani':1217 'match':1378 'may':679,833 'measur':871 'medium':980 'method':451 'miss':79,172 'mock':24,373,690,1189,1190,1201,1204,1210,1212,1256 'mode':67,92,94,127,156,210 'multipl':476,1357 'must':285,302,316,324 'mymethod':448 'mypackag':422,435,1143 'mypackage_test.go':423 'n':941,1069,1084 'name':287,294,437,479,490,498,507,520,971,1342,1403 'need':292,735 'never':337 'new':96,101,141 'nil':1157 'observ':342 'occur':791 'oper':728,884,1165 'order':169,321,711 'order-depend':168 'organ':407 'os.getenv':1152 'output':1071,1086 'packag':349,415,421,427,434,1142 'package_test.go':411 'panic':840 'parallel':32,182,956 'paralleltest':1227,1306 'paramet':593 'pass':87,296 'path':125 'pattern':153,167,582,1205,1269 'per':649 'per-test':648 'percentag':1118 'perform':872 'persona':43 'plus':883 'plus-oper':882 'point':818 'possibl':335 'postgr':1151 'pr':130 'practic':253,278,1220 'preced':249 'predict':712 'prefix':1379 'price':1062,1067,1070,1072,1077,1082,1085,1087 'principl':269 'process':1000 'produc':83 'product':11,230,261 'production-readi':10,260 'profil':861 'provid':4,695 'public':345,431 'q':1041,1042,1044 'qualiti':144,192 'quantiti':492,501,512,522,523 'queri':592 'quick':1327 'race':207,394,733,1406,1407 'rang':531,937,988 'reach':810 'readi':12,262 'real':719,1163 'reason':78 'refer':1242,1328 'regexp':1359 'regress':866,875 'releas':683 'reliabl':220,275 'repeat':827 'replac':368 'reproduc':219,738 'request/response':590 'requir':1255 'result':894,898,999,1003 'revers':1029,1030,1033,1034,1039,1040 'review':126,128,1321 'root':227 'run':391,815,961,1166,1336,1345,1353,1363,1375,1382,1389,1397 'runnabl':327 'samber/cc-skills-golang':243,849,1231,1244,1259,1271,1283,1298,1309 'scaffold':113 'scenario':477 'schema':1180 'see':583,689,844,848,1185,1211,1229,1243,1258,1270,1282,1297,1308 'select':778 'separ':310,1132,1169 'sequenti':104,154,218 'setup':234 'shallow':77 'singl':499 'singleitem':1076 'size':924,930,936,938,943,955 'skill':239,247,255,853,1235,1249,1263,1275,1288,1302,1314 'skill-golang-testing' 'small':975 'snapshot':41 'source-samber' 'specif':54,630,1338 'split':186 'sql':1179 'sql.open':1150 'stabl':685 'stack':632 'standard':370 'start':1369 'status':596 'strategi':72 'stretchr':1247 'string':491,972,1028 'strings.builder':900,912 'struct':489,970 'structur':148,405 'sub':184,1356 'sub-ag':183 'substr':1386 'subtest':288,1347,1392,1402 'suit':21,161,1184,1257 'summari':279,1413 'supersed':242 'synctest':716,795 'synctest.run':759 'synthet':798,808 't.errorf':545,1038 't.fatal':789,1158 't.parallel':173,333,959,995 't.run':298,533,990 'tabl':17,115,146,282,462,466,580 'table-driven':16,114,145,281,461,465,579 'tag':202,305,386,1130,1173,1426 'take':248 'target':65 'test':3,14,19,20,26,28,33,51,57,71,85,97,109,117,132,160,171,191,198,212,233,246,251,263,276,284,290,301,313,315,323,330,338,341,381,389,392,404,412,424,426,436,445,452,464,468,475,481,488,532,557,559,570,577,585,618,650,659,665,701,721,740,749,822,828,831,957,962,969,989,1058,1096,1127,1134,1137,1162,1168,1172,1183,1187,1206,1218,1268,1291,1331,1333,1335,1339,1344,1350,1352,1354,1358,1362,1364,1368,1374,1377,1381,1384,1388,1396,1405,1410,1415,1420,1425,1429 'testadd':441 'testcalculatepric':485 'testchanneltimeout':756 'testdatabaseintegr':1145 'testifi':23,363,1248,1252 'testifylint':1228,1304 'testin':42 'testing.b':456,880,887,903,929,946 'testing.f':1017 'testing.m':625,643 'testing.md':1264 'testing.t':443,450,487,537,655,758,762,968,994,1026,1147 'testing/synctest':661,667,692,751 'testmain':356,623,641 'testmystruct':447 'testnam':1337,1390,1394 'testname/subtest':1346 'testparalleloper':966 'testus':1376 'testworkerpool':653 'thelper':1226 'think':66 'time':697,702,720,726,745,750,799,809,820,1209 'time-bas':725 'time.after':730,786,805 'time.millisecond':775,788 'time.sleep':729,773,796 'time.ticker':731 'timeout':790,829,837 'today':88 'tomorrow':91 'tool':1104,1112,1120 'topic-agent' 'topic-agent-skills' 'topic-antigravity' 'topic-claude' 'topic-claude-code' 'topic-code' 'topic-codex' 'topic-coding' 'topic-copilot' 'topic-cursor' 'topic-gemini' 'topic-gemini-cli-extension' 'total':1116,1125 'trace':225 'treat':50 'tt':530,987 'tt.data':1001 'tt.expected':544,555 'tt.name':534,991 'tt.quantity':540,552 'tt.unitprice':541,553 'type':377,1194 'ultrathink':69 'unexport':420 'unit':25,190,312,380,556,558,1136,1398 'unitpric':494,503,514,525 'url':1154 'usag':1239 'use':68,110,286,303,332,353,362,384,573,604,687,715,835,958,1005,1128,1324 'v':780,784 'valid':1383 'var':910 'verifi':1055 'view':1099 'want':550,1043 'way':473 'white':417 'white-box':416 'within':1348 'work':103,217 'workflow':1296 'write':9,56,93,271,868 'yet':670 'z':1367 'zero':521","prices":[{"id":"4d72dfb5-63c2-49cb-b52f-c44e7b9ed41c","listingId":"8e952a60-871d-40ae-9a8c-f7e75c196562","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"samber","category":"cc-skills-golang","install_from":"skills.sh"},"createdAt":"2026-04-18T21:55:25.432Z"}],"sources":[{"listingId":"8e952a60-871d-40ae-9a8c-f7e75c196562","source":"github","sourceId":"samber/cc-skills-golang/golang-testing","sourceUrl":"https://github.com/samber/cc-skills-golang/tree/main/skills/golang-testing","isPrimary":false,"firstSeenAt":"2026-04-18T21:55:25.432Z","lastSeenAt":"2026-05-03T00:52:54.567Z"}],"details":{"listingId":"8e952a60-871d-40ae-9a8c-f7e75c196562","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"samber","slug":"golang-testing","github":{"repo":"samber/cc-skills-golang","stars":1478,"topics":["agent","agent-skills","ai","antigravity","claude","claude-code","code","codex","coding","copilot","cursor","gemini","gemini-cli-extension","openclaw","opencode","plugin","skills","skillsmp","vibe-coding"],"license":"mit","html_url":"https://github.com/samber/cc-skills-golang","pushed_at":"2026-05-01T15:51:26Z","description":"🧑‍🎨 A collection of Golang agentic skills that works","skill_md_sha":"ac65b734f1da805b928a46d5906662de442841a4","skill_md_path":"skills/golang-testing/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/samber/cc-skills-golang/tree/main/skills/golang-testing"},"layout":"multi","source":"github","category":"cc-skills-golang","frontmatter":{"name":"golang-testing","license":"MIT","description":"Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, memory leaks, CI with GitHub Actions, and idiomatic naming conventions. Use this whenever writing tests, asking about testing patterns or setting up CI for Go projects. Essential for ANY test-related conversation in Go.","compatibility":"Designed for Claude Code or similar AI coding agents, and for projects using Golang."},"skills_sh_url":"https://skills.sh/samber/cc-skills-golang/golang-testing"},"updatedAt":"2026-05-03T00:52:54.567Z"}}