In Go 1.21+, it seems that the go directive in go.mod must specify the patch version.
I haven't been able to dig deeper into why it was working correctly so far, but it seems that at least the problem occurs when you use it with a module that specifies the patch version.
See https://github.com/terraform-linters/tflint/actions/runs/8924581586/job/24511211255?pr=1991 See https://github.com/golang/go/issues/62278
In Go 1.21+, it seems that the
go
directive ingo.mod
must specify the patch version. I haven't been able to dig deeper into why it was working correctly so far, but it seems that at least the problem occurs when you use it with a module that specifies the patch version.