You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command cover can print coverage summary for each functions with go tool cover -func=c.out. But sometimes it is too much detail for me. The report would be more readable if the coverage summary were grouped by files or packages.
Examples:
$ go tool cover -func=out
root/a/foo.go:10: fooF 20%
root/a/foo.go:20: fooG 30%
root/a/foo.go:30: fooH 30%
root/a/foo2.go:30: foo2F 30%
root/b/goo.go:30: gooF 50%
root/b/goo.go:40: gooG 50%
# imaginary flag
$ go tool cover -summary-for-files=out
root/a/foo.go 90%
root/a/foo2.go 90%
root/b/goo.go 70%
# imaginary flag
$ go tool cover -summary-for-packages=out
root/a 90%
root/b 90%
The text was updated successfully, but these errors were encountered:
Command
cover
can print coverage summary for each functions withgo tool cover -func=c.out
. But sometimes it is too much detail for me. The report would be more readable if the coverage summary were grouped by files or packages.Examples:
The text was updated successfully, but these errors were encountered: