Closed mndrix closed 1 year ago
Note that right now, Go 1.21 and Go 1.20 are the two major Go releases supported per the Go release policy. Go 1.20.x will be supported for another 6 months or so until Go 1.22.0 comes out.
Setting the go line to 1.21 makes that the minimum required version for this module, meaning Go users who haven't yet upgraded from Go 1.20 to 1.21 will not be able to import the latest versions of packages from this module, not unless they too upgrade their module to require 1.21.
Perhaps that's fine, just wanted to point this out.
An alternative to consider is to keep the go.mod go line at a lower version (like 1.20) and use a //go:build go1.21
build constraint in .go files that need it, and //go:build !go1.20
that provides a fallback implementation for Go 1.20 and older. (Edit: See PR #152 that illustrates this idea.)
Point taken. Since Rob used Float64
, I assumed the 1.21 dependency was intentional. If not, I withdraw the PR.
This particular result was not intentional, but I was planning to move to 1.21 pretty soon. Might as well do it now!
Commit f024fcaf17 uses math/big.Int.Float64 which was introduced in Go version 1.21