golang - codecoverage always shows coverage: 0.0% of statements
It helped me
Just add -coverpkg=./...
option if tests are in sub folders:
go test ./... -v -coverpkg=./...
Try first:
go test -coverprofile=coverage.out
I then run, to see the result:
go tool cover -html=coverage.out
If the 1.3 version was installed through an upgrade of 1.1, 1.2, ..., you can try, as in issue 110:
I solved this by completely removing $GOPATH/src/code.google.com/p/go.tools and install cover again:
go get golang.org/x/tools/cmd/cover