Skip to content

Instantly share code, notes, and snippets.

@miekg
Created January 6, 2013 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miekg/4466456 to your computer and use it in GitHub Desktop.
Save miekg/4466456 to your computer and use it in GitHub Desktop.
run go test, when the file end in _test.go otherwise go build. Use in vim: autocmd Filetype go set makeprg=gobuildtest\ %
#!/bin/zsh
filename=$1;shift
case $filename in
*_test.go) go test "$@";;
*) go build "$@";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment