Claude Code Go Testing Skill for Table-Driven Subtests
Name edge cases and express their inputs and outcomes in one table, with a separate `t.Run` result for each case.
中文Install in Claude Code
Use a local Go module. The practice example needs only the standard testing package and a simple page-number parser.
- Get the complete `docs/zh-TW/skills/golang-testing` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/golang-testing/SKILL.md`, open Claude Code at the project root, and call `/golang-testing`.
Example task
Write rows for `1`, `0` and `hello` for a parser that accepts positive page numbers. Give each case a name and assert the result or error.What to check
The tests report one successful parse and independent failures for zero and nonnumeric input, with names that identify the behavior.
Original SKILL.md on GitHub · Updated
Frequently asked question
How do I rerun one failing case?
Pass the test name and subtest name pattern to `go test -run` to target it directly.