Upgrade local Golang and golangci-lint with fixes
Mainly these changes are to pick up Go 1.22 linter issues before upgrade (later this year) and to bring in more generics linting rules that help when writing that sort of code.
Upgrade local Golang to 1.21.10
.
Upgrade golangci-lint to 1.58.1
.
Update the golangci yaml to fix deprecations and remove settings that are same as default. gocyclo
has been relaxed a little as this often is picked up by cyclo
- we may want to remove one of these.
Add spancheck
otel span verifier that checks spans are being closed correctly. This has other potentially useful checks that are not turned on yet.
Fix the various linter errors and false positives that occur when updating all the linters.
Edited by Joe Shaw