Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
BUILD_OUTPUT=$(go build ./... 2>&1)
retVal=$?
if [ $retVal -ne 0 ]; then
echo "$BUILD_OUTPUT"
echo -e "\nErrors during compilation. Please fix before committing."
exit 1
fi
TEST_OUTPUT=$(go test ./... 2>&1)
retVal=$?
if [ $retVal -ne 0 ]; then
echo "$TEST_OUTPUT"
echo -e "\nErrors during testing. Please fix before committing."
exit 1
fi
@micvbang
Copy link
Author

micvbang commented Oct 22, 2018

Change the extension (only used for syntax highlighting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment