Files
everything-claude-code/docs/zh-CN/rules/golang/testing.md
zdoc.app ada4cd75a3 docs(zh-CN): sync Chinese docs with latest upstream changes (#304)
* docs(zh-CN): sync Chinese docs with latest upstream changes

* update

---------

Co-authored-by: neo <neo.dowithless@gmail.com>
2026-03-02 22:28:27 -08:00

483 B

paths
paths
**/*.go
**/go.mod
**/go.sum

Go 测试

本文档在 common/testing.md 的基础上扩展了 Go 特定的内容。

框架

使用标准的 go test 并采用 表格驱动测试

竞态检测

始终使用 -race 标志运行:

go test -race ./...

覆盖率

go test -cover ./...

参考

查看技能:golang-testing 以获取详细的 Go 测试模式和辅助工具。