我有一些代码。 但当 我尝试进行覆盖测试并得到响应:
'go get -u github.com/gregoryv/uncover/...
go test -coverprofile /tmp/c.out
uncover /tmp/c.out'
我尝试安装封面包:
go get code.google.com/p/go.tools/cmd/cover
但出现错误
package code.google.com/p/go.tools/cmd/cover: unrecognized import path "code.google.com/p/go.tools/cmd/cover" (parse https://code.google.com/p/go.tools/cmd/cover?go-get=1: no go-import meta tags (meta tag github.com/golang/go did not match import path code.google.com/p/go.tools/cmd/cover))
系统:Ubuntu 18.04
答案 0 :(得分:0)
正确的路径是:
go get golang.org/x/tools/cmd/cover