aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-09-14 12:12:19 +0200
committerBjørn Erik Pedersen <[email protected]>2023-09-14 13:09:45 +0200
commit79a17d9e55d280fdaef3fe294a88027923eff62d (patch)
tree86ef9409c73906e3f6de0b6bd5ddd208896a21cc /main_test.go
parent75c0f88289585faa9801e7178673bc9ff5f25594 (diff)
downloadhugo-79a17d9e55d280fdaef3fe294a88027923eff62d.tar.gz
hugo-79a17d9e55d280fdaef3fe294a88027923eff62d.zip
Fix tests for Go 1.21.1
Fixes #11450
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go2
1 files changed, 1 insertions, 1 deletions
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, ".")]
}