bump go to 1.22

Many dependencies started using go 1.22 which means we have to follow in
order to update.

Disable the now depracted exportloopref linter as it was replaced by
copyloopvar as go fixed the loop copy problem in 1.22[1]

Another new chnage in go 1.22 is the for loop syntax over ints, the
intrange linter chacks for this but there a lot of loops that have to be
converted so I didn't do it here and disable th elinter for now, th eold
syntax is still fine.

[1] https://go.dev/blog/loopvar-preview

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-09-03 13:41:53 +02:00
parent d03e8ffc56
commit f93fcf7dee
23 changed files with 3 additions and 40 deletions

View File

@ -43,7 +43,6 @@ func TestCause(t *testing.T) {
expectedErr: fmt.Errorf("0: %w", errors.New("error")),
},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
err := Cause(tc.err())