Skip to content

Commit

Permalink
Fix tests for Go 1.21.1
Browse files Browse the repository at this point in the history
Fixes #11450
  • Loading branch information
bep committed Sep 14, 2023
1 parent 75c0f88 commit 79a17d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ".")]
}
Expand Down

0 comments on commit 79a17d9

Please sign in to comment.