Merge pull request #21053 from rhatdan/VERSION

Move golang requirement from 1.18 to 1.20
This commit is contained in:
openshift-merge-bot[bot]
2023-12-19 12:10:46 +00:00
committed by GitHub
4 changed files with 7 additions and 13 deletions

View File

@ -332,7 +332,7 @@ $(IN_CONTAINER): %-in-container:
$(PODMANCMD) run --rm --env HOME=/root \ $(PODMANCMD) run --rm --env HOME=/root \
-v $(CURDIR):/src -w /src \ -v $(CURDIR):/src -w /src \
--security-opt label=disable \ --security-opt label=disable \
docker.io/library/golang:1.18 \ docker.io/library/golang:1.20 \
make $(*) make $(*)

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/containers/podman/v4 module github.com/containers/podman/v4
go 1.18 go 1.20
require ( require (
github.com/BurntSushi/toml v1.3.2 github.com/BurntSushi/toml v1.3.2

View File

@ -4,6 +4,8 @@ import (
"fmt" "fmt"
"sort" "sort"
"strings" "strings"
"golang.org/x/exp/maps"
) )
// Policy describes a basic trust policy configuration // Policy describes a basic trust policy configuration
@ -51,11 +53,7 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
} }
output = append(output, descriptionsOfPolicyRequirements(policyContentStruct.Default, template, registryConfigs, "", idReader)...) 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 := maps.Keys(policyContentStruct.Transports)
transports := []string{}
for t := range policyContentStruct.Transports {
transports = append(transports, t)
}
sort.Strings(transports) sort.Strings(transports)
for _, transport := range transports { for _, transport := range transports {
transval := policyContentStruct.Transports[transport] transval := policyContentStruct.Transports[transport]
@ -63,11 +61,7 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
transport = "repository" transport = "repository"
} }
// FIXME: This should use x/exp/maps.Keys after we update to Go 1.18. scopes := maps.Keys(transval)
scopes := []string{}
for s := range transval {
scopes = append(scopes, s)
}
sort.Strings(scopes) sort.Strings(scopes)
for _, repo := range scopes { for _, repo := range scopes {
repoval := transval[repo] repoval := transval[repo]

View File

@ -1,6 +1,6 @@
module github.com/containers/podman/test/tools module github.com/containers/podman/test/tools
go 1.18 go 1.20
require ( require (
github.com/cpuguy83/go-md2man/v2 v2.0.3 github.com/cpuguy83/go-md2man/v2 v2.0.3