golang查看单元测试覆盖率的命令

75 阅读1分钟
go test -gcflags "all=-l" -coverprofile=coverprofile.cov -run="^Test"
go tool cover -html=coverprofile.cov