mirror of
https://github.com/containers/podman.git
synced 2025-05-22 17:46:52 +08:00
Merge pull request #21053 from rhatdan/VERSION
Move golang requirement from 1.18 to 1.20
This commit is contained in:
2
Makefile
2
Makefile
@ -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
2
go.mod
@ -1,6 +1,6 @@
|
||||
module github.com/containers/podman/v4
|
||||
|
||||
go 1.18
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.3.2
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user