go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.91k stars 1.02k forks source link

chore: update to go1.22 #2144

Closed ldez closed 6 months ago

ldez commented 6 months ago

https://tip.golang.org/doc/go1.22

iwind commented 4 months ago

Is it realy worth to do this? it's a expensive decision, and gain less benifits.

dmke commented 4 months ago

Expensive in terms of... what exactly? I find the tests much easier to read and maintain without the line noise in for-loops.

Sure, we loose support for Go 1.21. But since Lego follows the Go support cycle (i.e. the only the current and previous Go releases are supported), and Go 1.23 is slated for release in August, we could have waited until then. Using 1.22 now however is not a huge ask.

iwind commented 4 months ago

To improve some (maybe 4-5) for loops, you forced thousands projects to upgrade their Go version to 1.22. Okay, maybe you are right, and everyone should and MUST fork the repository and change the go version in their go.mod file. It seems not a big problem, but it's still EXPENSIVE in my own opinion.

And, at last, i sincerely thank you for your work.

dmke commented 4 months ago

Again, not merging this PR now would have delayed the 1.22 upgrade only by a few months.

Also note that this commit is not yet part of any release. If you want to use the development version, you need to keep up with the project dependencies :)

ldez commented 4 months ago

you forced thousands projects to upgrade their Go version to 1.22

@iwind Can you provide a list of those thousands of projects?

Those thousands of projects that use an unreleased version of lego MUST think to sponsor lego if it's critical for them.

https://github.com/sponsors/ldez

I think free is not EXPENSIVE.