以 HTML 格式查看代码覆盖率
正常运行 go test,然后使用 coverprofile 标志。然后使用 go tool 以 HTML 格式查看结果。
go test -coverprofile=c.out
go tool cover -html=c.out
正常运行 go test,然后使用 coverprofile 标志。然后使用 go tool 以 HTML 格式查看结果。
go test -coverprofile=c.out
go tool cover -html=c.out