Last Updated: February 25, 2016
·
2.475K
· googollee

Get coverage of golang test

cover () { 
    t="/tmp/go-cover.$$.tmp"
    go test -coverprofile=$t $@ && go tool cover -html=$t && unlink $t
}

cover # run cover under golang project directory