Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: report coverage per function #5985

davecheney opened this issue Jul 29, 2013 · 1 comment

testing: report coverage per function #5985

davecheney opened this issue Jul 29, 2013 · 1 comment


Copy link

davecheney commented Jul 29, 2013

Feature request: 

Would it be possible to add a mode to go test -cover similar to gocov's report mode?

The goal is to report coverage on a per function basis so you can see where your
coverage is lacking. Something like this:

lucky(~/go/src/pkg/crypto/md5) % gocov test | gocov report
ok      crypto/md5      0.016s

crypto/md5/md5.go                digest.Write            100.00% (20/20)
crypto/md5/md5.go                digest.Reset            100.00% (6/6)
crypto/md5/md5.go                Sum                     100.00% (4/4)
crypto/md5/md5.go                digest.Sum              100.00% (3/3)
crypto/md5/md5.go                New                     100.00% (3/3)
crypto/md5/md5.go                init                    100.00% (1/1)
crypto/md5/md5.go                digest.Size             100.00% (1/1)
crypto/md5/md5.go                digest.checkSum         94.74% (18/19)
crypto/md5/md5.go                digest.BlockSize        0.00% (0/1)
crypto/md5/md5block_decl.go      block                   0.00% (0/0)
crypto/md5                       ----------------        96.55% (56/58)
Copy link

robpike commented Aug 9, 2013

Comment 2:

This issue was closed by revision golang/tools@4622486.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants