代码之家  ›  专栏  ›  技术社区  ›  RudziankoÅ­

如何重写gocov命令去工具封面?

  •  0
  • RudziankoÅ­  · 技术社区  · 6 年前

    ${GOPATH}/bin/gocov test ./... 2>test | ${GOPATH}/bin/gocov report
    

    如果我使用 go tool cover

    1 回复  |  直到 6 年前
        1
  •  0
  •   RudziankoÅ­    6 年前

    从go 1.10开始 go tool coverage 支持递归包绕过

     go test ./... -coverprofile=coverage.out
    
        2
  •  0
  •   Alex Punnen    5 年前

    从这里开始对我有用 https://forum.golangbridge.org/t/how-to-do-go-test-coverage-for-system-testing/6479/3

    go test -coverprofile=cover.out -coverpkg=server \
        && go tool cover -html=cover.out