golang查看go test代码覆盖率 wisteria 2023-05-16 307 阅读1分钟 执行 go test 命令,会自动统计覆盖率 [root@localhost sdpsc]# go test ./... -coverprofile=size_coverage.out 然后用go tools命令输出到html文件 go tool cover -html=size_coverage.out