Go Test
...
测试指定函数
例如: 仅执行单元测试 TestAdd()
go test -v -run TestAdd ./
执行所有 TestClient 开头的单元测试
go test -v
示例
可以在测试中添加示例来演示真实的使用情况, 来保证测试和演示的真实性和有效性.
some command
go test -test.v -test.run ^\Q<Test_Func>\E$ -test.coverprofile testcover.out
go tool test2json -t
go tool cover -html
参考
[支持/订阅](https://afdian.com/a/taadis)作者,以获得更多服务.

浙公网安备 33010602011771号