Skip to content

Commit

Permalink
Use Go 1.22 (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Feb 19, 2024
1 parent 36d6798 commit 829ef26
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/FerretDB/github-actions

go 1.21
go 1.22

require (
github.com/FerretDB/gh v0.1.3
Expand Down
2 changes: 1 addition & 1 deletion setup-go/action.yml
Expand Up @@ -16,7 +16,7 @@ runs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.21.7"
go-version: "1.22.0"
cache: false

- name: Run tool
Expand Down
4 changes: 2 additions & 2 deletions tools/check.go
Expand Up @@ -35,7 +35,7 @@ func main() {
flag.Parse()

if *oldF {
log.Fatalf("github-actions require Go 1.21 or later.")
log.Fatalf("github-actions require Go 1.22 or later.")
}

v := runtime.Version()
Expand All @@ -51,6 +51,6 @@ func main() {
}

if minor < 18 {
log.Fatalf("github-actions require Go 1.21 or later. The version of `go` binary in $PATH is %q.", v)
log.Fatalf("github-actions require Go 1.22 or later. The version of `go` binary in $PATH is %q.", v)
}
}
2 changes: 1 addition & 1 deletion tools/go.mod
@@ -1,6 +1,6 @@
module github.com/FerretDB/github-actions/tools

go 1.21
go 1.22

require (
github.com/go-task/task/v3 v3.34.1
Expand Down
4 changes: 2 additions & 2 deletions tools/old.go
Expand Up @@ -14,8 +14,8 @@

// Keep both old and new styles of build tags.

//go:build !go1.21
// +build !go1.21
//go:build !go1.22
// +build !go1.22

package tools

Expand Down
6 changes: 3 additions & 3 deletions tools/tools.go
Expand Up @@ -14,8 +14,8 @@

// Keep both old and new styles of build tags.

//go:build go1.21
// +build go1.21
//go:build go1.22
// +build go1.22

package tools

Expand All @@ -31,7 +31,7 @@ import (
)

// Check that `go` in $PATH have the right version.
// Catches problems like `/some/path/go generate` invocations where `/some/path/go` is 1.21+
// Catches problems like `/some/path/go generate` invocations where `/some/path/go` is 1.22+
// (that's checked by the build tags above), but just `go` in $PATH (typically something like `/usr/bin/go`)
// is an earlier version.

Expand Down

0 comments on commit 829ef26

Please sign in to comment.