Last active
June 18, 2017 10:30
-
-
Save secnot/1a08321e977ea6464dd05bcabcbdf086 to your computer and use it in GitHub Desktop.
Generate Go package test coverage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go get -u github.com/username/repo | |
# Profile test | |
$ go test -coverprofile cover.out github.com/username/repo | |
# Generate nicer html representation from profiles | |
$ go tool cover -html=cover.out -o cover.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment