Skip to content

Commit

Permalink
Add go1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Mar 10, 2023
1 parent 9f71238 commit b2ace3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -221,6 +225,7 @@ func SupportedPlatforms(v string) []Platform {
{">= 1.16, < 1.17", Platforms_1_16},
{">= 1.17, < 1.18", Platforms_1_17},
{">= 1.18, < 1.19", Platforms_1_18},
{">= 1.19, < 1.20", Platforms_1_19},
}

for _, p := range platforms {
Expand Down
5 changes: 3 additions & 2 deletions platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b2ace3c

Please sign in to comment.