Closed ddymko closed 4 months ago
@ddymko this was not an oversight and changing it would be a breaking change.
The go directive sets the minimum version of Go required to use this module. Before Go 1.21, the directive was advisory only; now it is a mandatory requirement: Go toolchains refuse to use modules declaring newer Go versions.
I highly recommend everyone read carefully through the last few Go releases and the Go Mod Reference as dependencies management and managing packages has become much harder; it's easier to make an unintended breaking change than ever before. Also watch out as the Go tooling, I've caught it automatically changing this information without me asking for it.
For other package maintainers that may read this I highly recommend using go build directives to support newer functionality introduced in newer go versions as well as maintaining backward compatibility with older versions, bumping the go.mod Go version is not the solution and is a breaking change, an example can be found here in one of my other packages.
@deankarn thanks for detailed response
Package version eg. v9, v10:
v1.10
Issue, Question or Enhancement:
Hey there 👋
Curious to see if there is a reason why the go version in go.mod is still on 1.18?
The go versions in other spots of the repo, mainly github actions, are on 1.21. If this was an oversight I'll gladly push up a PR to bump the version 🙂 !