Go 1.22 is the oldest officially supported version of Go currently and
at Einride we aim to follow that guideline.
In order to get the project to build a number of other changes needed
to be done.
go.einride.tech/sage needed to be updated to get us a golangci-lint
version that can lint 1.22 and with that a whole swath of lints were
activated:
- most are on the form of copyloopvar (i.e. loop variables
now work as most people expect and we don't need to copy them)
- we were also shadowing min/max builtins that were introduced in Go
1.21, these are now renamed were applicable.
BREAKING CHANGE: The library requires Go 1.22 to build, no other user
visible changes introduced.