Skip to content

Commit

Permalink
Merge pull request containers#21053 from rhatdan/VERSION
Browse files Browse the repository at this point in the history
Move golang requirement from 1.18 to 1.20
  • Loading branch information
openshift-merge-bot[bot] authored Dec 19, 2023
2 parents d161cf3 + 4dd58f2 commit 6a65597
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ $(IN_CONTAINER): %-in-container:
$(PODMANCMD) run --rm --env HOME=/root \
-v $(CURDIR):/src -w /src \
--security-opt label=disable \
docker.io/library/golang:1.18 \
docker.io/library/golang:1.20 \
make $(*)


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/containers/podman/v4

go 1.18
go 1.20

require (
github.com/BurntSushi/toml v1.3.2
Expand Down
14 changes: 4 additions & 10 deletions pkg/trust/trust.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"fmt"
"sort"
"strings"

"golang.org/x/exp/maps"
)

// Policy describes a basic trust policy configuration
Expand Down Expand Up @@ -51,23 +53,15 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
}
output = append(output, descriptionsOfPolicyRequirements(policyContentStruct.Default, template, registryConfigs, "", idReader)...)
}
// FIXME: This should use x/exp/maps.Keys after we update to Go 1.18.
transports := []string{}
for t := range policyContentStruct.Transports {
transports = append(transports, t)
}
transports := maps.Keys(policyContentStruct.Transports)
sort.Strings(transports)
for _, transport := range transports {
transval := policyContentStruct.Transports[transport]
if transport == "docker" {
transport = "repository"
}

// FIXME: This should use x/exp/maps.Keys after we update to Go 1.18.
scopes := []string{}
for s := range transval {
scopes = append(scopes, s)
}
scopes := maps.Keys(transval)
sort.Strings(scopes)
for _, repo := range scopes {
repoval := transval[repo]
Expand Down
2 changes: 1 addition & 1 deletion test/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/containers/podman/test/tools

go 1.18
go 1.20

require (
github.com/cpuguy83/go-md2man/v2 v2.0.3
Expand Down

0 comments on commit 6a65597

Please sign in to comment.