vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
791 stars 247 forks source link

Upgrade to go1.22 + golangci-lint v1.59.0 #769

Open otherview opened 1 month ago

otherview commented 1 month ago

Description

Upgrades all golang usage to 1.22 and the linter to 1.59.0. It's possible to upgrade by doing the following these commands:

go install golang.org/dl/go1.22.4@latest
go1.22.4 download
go1.22.4 env GOROOT

# Add this to your .zshrc
export GOROOT=/Users/pedro/sdk/go1.22.4/
export PATH=/Users/pedro/go/bin/:$PATH

sudo ln -sf /Users/pedro/sdk/go1.22.4/bin/go /usr/local/go/bin/go

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
golangci-lint --version

Fixes # (issue)

Type of change

How Has This Been Tested?

Local executions + CI

Checklist:

libotony commented 1 month ago

Updating the CI tool and build environment to the latest version of Go seems beneficial. It is a good practice to ensure that we always use the most up-to-date Go building distributions.

Bumping the minimum version might need a strong motivation of it, like in #749.