Skip to content

Commit 825808c

Browse files
committed
Upgrade minimum Go version to 1.24
The "tool" directive breaks building on Go 1.23. Go 1.23 will not be supported anymore by the Go team in a few weeks anyway. So let's jump to Go 1.24 as the minimum version.
1 parent 26cad54 commit 825808c

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
matrix:
1010
go:
1111
- stable
12-
- oldstable
12+
# "tool" directive in go.mod breaks go1.23
13+
# - oldstable
1314
steps:
1415

1516
- name: Check out code

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dolmen-go/goeval
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
golang.org/x/mod v0.24.0

main_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import (
2020
"bytes"
2121
"os"
2222
"os/exec"
23-
"runtime"
24-
"strings"
2523
"testing"
2624
)
2725

@@ -108,10 +106,6 @@ func goevalPrint(stdout func(...any), stderr func(...any), args ...string) {
108106
// As goeval is declared as a tool in go.mod (go get -tool .), we can call it as a tool.
109107
// "go tool" preserves the exit code while "go run" doesn't.
110108
cmd := exec.Command("go", append([]string{"tool", "goeval"}, args...)...)
111-
if strings.HasPrefix(runtime.Version(), "go1.23.") { // TODO remove this compatibility shim
112-
// Allow testing with Go < 1.24, unfortunately with all "go run" quirks
113-
cmd = exec.Command("go", append([]string{"run", "."}, args...)...)
114-
}
115109
cmd.Stdin = nil
116110
cmd.Stdout = printlnWriter(stdout)
117111
cmd.Stderr = printlnWriter(stderr)

0 commit comments

Comments
 (0)