sqids / sqids-go

Official Go port of Sqids. Generate short unique IDs from numbers.
https://sqids.org/go
MIT License
492 stars 8 forks source link

Minimum Go version to support? #4

Closed peterhellberg closed 11 months ago

peterhellberg commented 11 months ago

The currently supported versions of Go are 1.21 and 1.20. I assume we want both of these supported by the library as of right now?

(I thought it could be good to open an issue to document how you would like to deal with additions to the language going forward, such as slices.Equal introduced in 1.21)

4kimov commented 11 months ago

I assume we want both of these supported by the library as of right now?

I think that'd be nice, yes.

to document how you would like to deal with additions to the language going forward

Honestly, I don't have an opinion, other than supporting what's reasonable. What do you suggest?

peterhellberg commented 11 months ago

I suggest targeting the two supported versions going forward in order to allow more people to use the library but still not get stuck in supporting no longer supported versions of the language. This means that we would wait with usage of newly introduced functionality until it has landed in the previous version. (A delay of half a year or so in general)

This would imply keeping the go module directive as 1.20 for the time being. And only bumping that if required by some new functionality supported in both (at the time) currently supported Go versions.

4kimov commented 11 months ago

Well said. I agree.