Created
June 29, 2016 20:11
-
-
Save FrenchBen/cbdc889a55413367151ed06ab5ab81b2 to your computer and use it in GitHub Desktop.
Golang go alias
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
function go_cover() { | |
coverage=$(mktemp) | |
trap "rm -f ${coverage}" EXIT | |
go test -coverprofile=${coverage} "$@" && \ | |
go tool cover -func=${coverage} && \ | |
go tool cover -html=${coverage} | |
} | |
alias go_cover='go_cover' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment