claude-code/claude/rules/golang/testing.md

32 lines
457 B
Markdown
Raw Normal View History

2026-02-27 13:44:09 +00:00
---
paths:
- "**/*.go"
- "**/go.mod"
- "**/go.sum"
---
# Go Testing
> This file extends [common/testing.md](../common/testing.md) with Go specific content.
## Framework
Use the standard `go test` with **table-driven tests**.
## Race Detection
Always run with the `-race` flag:
```bash
go test -race ./...
```
## Coverage
```bash
go test -cover ./...
```
## Reference
See skill: `golang-testing` for detailed Go testing patterns and helpers.