This repository contains pre-commit hooks for modern Golang developers.
Add this to your .pre-commit-config.yaml
:
repos:
- repo: https://sources.dev.pztrn.name/pztrn/pre-commit-hooks-golang
rev: master
hooks:
- id: golangci-lint-mod
...
go-test-mod-cover
- executesgo test
with-cover
parameter.golangci-lint-mod
- executesgolangci-lint
in module mode (GO111MODULES=on
)