It's easy to accidentally leave out changes to go mod files (go.mod, go.sum, go.work.sum) when preparing PRs, especially if you rebase. Usually, any go operation would catch it, because the default is -mod readonly; but, workspace files seem exempt from this, and go vet doesn't appear to honour it either.
Therefore: add a backstop in the GitHub Actions workflow, to stop incidental changes slipping through.
It's easy to accidentally leave out changes to go mod files (go.mod, go.sum, go.work.sum) when preparing PRs, especially if you rebase. Usually, any go operation would catch it, because the default is
-mod readonly
; but, workspace files seem exempt from this, andgo vet
doesn't appear to honour it either.Therefore: add a backstop in the GitHub Actions workflow, to stop incidental changes slipping through.