From 932093e9193f5a572fce60db94f8217e8ed4d7c2 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 5 Aug 2022 12:31:21 +0800 Subject: [PATCH] Add go1.19 Fixes #165. --- platform.go | 6 +++++- platform_test.go | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/platform.go b/platform.go index 3d4ab71..bc6b83e 100644 --- a/platform.go +++ b/platform.go @@ -178,7 +178,11 @@ var ( // no new platforms in 1.18 Platforms_1_18 = Platforms_1_17 - PlatformsLatest = Platforms_1_18 + Platforms_1_19 = addDrop(Platforms_1_18, []Platform{ + {"linux", "loong64", true}, + }, nil) + + PlatformsLatest = Platforms_1_19 ) // SupportedPlatforms returns the full list of supported platforms for diff --git a/platform_test.go b/platform_test.go index 14da569..1771816 100644 --- a/platform_test.go +++ b/platform_test.go @@ -108,10 +108,11 @@ func TestSupportedPlatforms(t *testing.T) { t.Fatalf("bad: %#v", ps) } - ps = SupportedPlatforms("go1.10") - if !reflect.DeepEqual(ps, Platforms_1_10) { + ps = SupportedPlatforms("go1.19") + if !reflect.DeepEqual(ps, Platforms_1_19) { t.Fatalf("bad: %#v", ps) } + // Unknown ps = SupportedPlatforms("foo") if !reflect.DeepEqual(ps, PlatformsLatest) {