A linter for go.mod
file - validates NO replace
directive is committed
if git diff --name-only --cached | grep -q ":\s*go\.mod"; then
gomodlint
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi
fi
You should have a Go language installed in your workflow. Then you can use this action as follows:
- name: go.mod validation
run: go run github.com/strongo/gomodlint@latest
Free to use & modify - MIT License
- github.com/sneat-co - an extendable platform that allows to build apps with extension modules.
- DALgo - Database Abstraction Layer in GO language