我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

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

I have following command:

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

How this command will look like if I use go tool cover?

Since go 1.10 go tool coverage supports recursive package bypass

 go test ./... -coverprofile=coverage.out

This worked for me from here 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

近期文章

  • “不能在赋值中用作类型字符串”
  • Golang,GORM,Postgres,ACL
  • 减少golang插件文件的大小
  • XML值的自定义元帅数组
  • 如何在go中打印反斜杠?
  • 使用get get获取展示框架时出错
  • Go实例的调试列表为空
  • golang json的元帅时间戳
  • dlv attach <pid> [二进制位置]拒绝访问
  • 使用golang.org/x/text/message格式化big.Rat
  • Git检出到Jenkins中的子目录失败
  • 如何从Golang中的XML文件提取多个字段
  • 新项目的Golang建筑问题
  • 我如何在json中响应时间毫秒零
  • 确定是否在解组时在json字符串中提供了值[重复]
  • 使用IntelliJ运行Go应用程序时加载配置文件
  • 使用glide在设置docker分发库中面临问题
  • 如何有条件地同时重定向和使用资产提供HTML
  • 客户端通过nginx取消请求是否传递给fastcgi
  • 如何从字节数组执行而不创建物理文件

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华