Created
December 20, 2023 09:19
-
-
Save bep/dd028155becfb5a9761b657f4aed3353 to your computer and use it in GitHub Desktop.
A zsh/bash function to test big Go projects in silent mode
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
function gota() { | |
set -o pipefail | |
go test -failfast ./... | { grep -Ev "^(\?|ok)\s+" || :; } | |
if [ $? -eq 0 ] | |
then | |
echo "Test OK." | |
else | |
echo "Test failed." >&2 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment