Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 509 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 509 Bytes

githooks-go

pre-commit git hooks for Golang projects

Prerequisites

  • goimports
  • gofmt
# installing goimports
$ go install golang.org/x/tools/cmd/goimports@latest

# installing gofumpt
$ go install mvdan.cc/gofumpt@latest

copying the git hook

# clone the repo
git clone --depth=1 https://github.com/Lokesh-Balla/githooks-go.git

# copy githooks from githooks folder to git repository
$ cd githooks-go
$ chmod +x githooks/*
$ cp githooks/* <project_directory>/.git/hooks/