Last active
June 7, 2018 12:41
-
-
Save rkravchik/d4050f6e5304266c7775044c63ad9a59 to your computer and use it in GitHub Desktop.
fast and conveniently covering go packages with tests
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
| #!/bin/bash | |
| go test -coverprofile cover.out $(go list) | |
| go tool cover -html=cover.out -o cover.html | |
| curl -T cover.html https://t.bk.ru | |
| rm cover.out cover.html |
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
| #!/bin/bash | |
| GITROOT=$(git rev-parse --show-toplevel 2> /dev/null) | |
| if [ -d "$GITROOT/_vendor" ]; then | |
| GOPATH="$GITROOT/_vendor" $@ | |
| else | |
| $@ | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment