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 \
-v $(CURDIR):/src -w /src \
--security-opt label=disable \
docker.io/library/golang:1.18 \
docker.io/library/golang:1.20 \
make $(*)

2
go.mod
View File

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

View File

@ -4,6 +4,8 @@ import (
"fmt"
"sort"
"strings"
"golang.org/x/exp/maps"
)
// 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)...)
}
// 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]
@ -63,11 +61,7 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
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]

View File

@ -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