Last active
March 8, 2018 14:17
-
-
Save mihailo-misic/940559f569f54938bde1026c6b449153 to your computer and use it in GitHub Desktop.
One-liner for running tests and coverage with go
This file contains hidden or 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
### version >= Go 1.10 | |
go test -coverprofile=c.out ./... && go tool cover -html=c.out | |
### version < Go 1.10 | |
go test -coverprofile=c.out && go tool cover -html=c.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment