Husky

Husky.js like, but pure in golang
Usage
install
go get -u github.com/go-courier/husky/cmd/husky
Configuration .husky.yaml
hooks:
# hook scripts
pre-commit:
- golangci-lint run
- husky lint-staged
commit-msg:
- husky lint-commit
# list staged files do some pre-process and git add
lint-staged:
"*.go":
- gofmt -l -w
# commit msg rule only support conventionalcommits
lint-commit:
# could check if this exists
# regexp
email: "^(.+@gmail.com|.+@qq.com)$"
Commit msg rule follow https://www.conventionalcommits.org/en/v1.0.0/
type(scope?): header
body?
footer?