git hooks for Go projects
Go to file
2015-08-01 01:16:51 +00:00
general [general] better failure result handling and method to list files 2015-08-01 00:30:22 +00:00
githook-gobuild [gobuild] initial hook to check the build 2015-07-31 23:53:25 +00:00
githook-gofmt [main] show only files that don't match gofmt 2015-08-01 01:16:05 +00:00
githook-gotest [gotest] new hook for go test and added binary to gitignore 2015-07-31 23:58:20 +00:00
.gitignore added binary 2015-08-01 00:29:50 +00:00
LICENSE Initial commit 2015-08-01 01:20:47 +02:00
main.go [main] fixed some directory hazzle 2015-08-01 01:16:17 +00:00
README.md fixed the readme 2015-08-01 01:16:51 +00:00

git-hooks

Collection of git hooks. Most of the pre-commit hooks are Go specific.

usage

  • to install the hooks use:

      go get github.com/mthie/git-gohooks
    
      go get github.com/mthie/git-gohooks/githook-gobuild
    
      go get github.com/mthie/git-gohooks/githook-gofmt
    
      go get github.com/mthie/git-gohooks/githook-gotest
    
  • you have the choice to copy it to your .git/hooks/ folder or to symlink it with

    ( cd .git/hooks && \
    
      ln -s $GOPATH/bin/git-gohooks pre-commit && \
    
      ln -s $GOPATH/bin/githook-gofmt pre-commit_01_gofmt && \
    
      ln -s $GOPATH/bin/githook-gobuild pre-commit_02_gobuild && \ 
    
      ln -s $GOPATH/bin/githook-gotest pre-commit_03_gotest )