Last Updated: February 25, 2016
·
2.919K
· 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