From be2c634751cead54a9369633251f338759ddc0a7 Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Thu, 14 Sep 2023 12:12:19 +0200 Subject: Fix tests for Go 1.21.1 Fixes #11450 --- main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index eda829dbb..2df40b0e2 100644 --- a/main_test.go +++ b/main_test.go @@ -398,7 +398,7 @@ func testSetupFunc() func(env *testscript.Env) error { goVersion := runtime.Version() goVersion = strings.TrimPrefix(goVersion, "go") - if !strings.HasSuffix(goVersion, ".0") { + if strings.HasPrefix(goVersion, "1.20") { // Strip patch version. goVersion = goVersion[:strings.LastIndex(goVersion, ".")] } -- cgit v1.2.3