Skip to content

Commit

Permalink
tools/go.mod: Update the go version from 1.22.0 to 1.22.1
Browse files Browse the repository at this point in the history
Latest release of golangci-lint uses `go 1.22.1` as part of go mod file
so when our tooling try to consume this version then following is added
for `tools/go.mod` because in our mod file we mention minimum required
go version is `1.22.0` and as per go toolchain guideline it should run
in in newer toolchain

```
go 1.22.0
toolchain go1.22.5
```

snip from: https://go.dev/doc/toolchain
```
When the go or toolchain line is newer than the bundled toolchain,
the go command runs the newer toolchain instead. For example, when
using the go command bundled with Go 1.21.3 in a main module that
says go 1.21.9, the go command finds and runs Go 1.21.9 instead. It
first looks in the PATH for a program named go1.21.9 and otherwise
downloads and caches a copy of the Go 1.21.9 toolchain.
```

- https://github.com/golangci/golangci-lint/blob/v1.61.0/go.mod#L3
  • Loading branch information
praveenkumar committed Oct 8, 2024
1 parent 3a8f554 commit ec42d9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/crc-org/crc/tools

go 1.22.0
go 1.22.1

require (
github.com/cfergeau/gomod2rpmdeps v0.0.0-20210223144124-2042c4850ca8
Expand Down
2 changes: 1 addition & 1 deletion update-go-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ golang_base_version=$1
echo "Updating golang version to $golang_base_version"

go mod edit -go "${golang_base_version}.0"
go mod edit -go "${golang_base_version}.0" tools/go.mod
go mod edit -go "${golang_base_version}.1" tools/go.mod

sed -i "s,^GOVERSION = 1.[0-9]\+,GOVERSION = ${golang_base_version}," Makefile
sed -i "s,^\(FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-\)1.[0-9]\+,\1${golang_base_version}," images/*/Dockerfile
Expand Down

0 comments on commit ec42d9c

Please sign in to comment.