From 79a17d9e55d280fdaef3fe294a88027923eff62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 14 Sep 2023 12:12:19 +0200 Subject: [PATCH] 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 eda829dbb3f..2df40b0e296 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, ".")] }