Skip to content

Instantly share code, notes, and snippets.

@apremalal
Created August 17, 2016 01:26
Show Gist options
  • Save apremalal/b7cc4ec9047f0a5dd52a28bad0fbb708 to your computer and use it in GitHub Desktop.
Save apremalal/b7cc4ec9047f0a5dd52a28bad0fbb708 to your computer and use it in GitHub Desktop.
Exclude vendor directory from goimports, go fmt,go install, go test ...
echo 'Formatting the code base...'
godep go fmt $(go list ./... | grep -v /vendor/)
echo 'Optimizing the imports...'
goimports -w $(go list -f {{.Dir}} ./... | grep -v /vendor/)
echo 'Installing dependencies. This might take some time...'
godep go install $(go list ./... | grep -v /vendor/)
echo "Executing test"
godep go test -v $(go list ./... | grep -v /vendor/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment