Skip to content

Instantly share code, notes, and snippets.

@bep
Created December 20, 2023 09:19
Show Gist options
  • Save bep/dd028155becfb5a9761b657f4aed3353 to your computer and use it in GitHub Desktop.
Save bep/dd028155becfb5a9761b657f4aed3353 to your computer and use it in GitHub Desktop.
A zsh/bash function to test big Go projects in silent mode
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