Skip to content

Instantly share code, notes, and snippets.

@nownabe
Created January 11, 2018 01:34
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 nownabe/b30ebdf8056645eba7ab867e371a53e7 to your computer and use it in GitHub Desktop.
Save nownabe/b30ebdf8056645eba7ab867e371a53e7 to your computer and use it in GitHub Desktop.
Go pre-commit
#!/bin/bash
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$')
[[ -z "${gofiles}" ]] && exit 0
make pre-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment