Relative Content

Tag Archive for godependency-management

Preventing go.mod changes from running `go fmt ./…`

I’m running a GitHub pipeline that (among other tests) ensures that code is properly formatted. I do that by running go fmt ./... on my source and then checking that this doesn’t change anything with git diff -q. In addition to that, I’m running the pipeline using different versions of Go (1.20 to 1.22) to ensure compatibility. Please take into consideration that I may be misunderstanding the content of the go.mod file and that I’m not using it properly to express my intentions.