2016-01-24 36 views
0

运行gb如何使用gb获取代码覆盖率?

gb test .../<regex>/... -v 

的作品,但在运行gb test .../<regex>/... -coverprofile=cover.out结果:

testing: cannot use -test.coverprofile because test binary was not built with coverage enabled 

go test -coverprofile cover.out作品。如何使用gb获得代码覆盖率?

回答