mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
fix(deps): update github.com/containers/common digest to e18cda8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -13,7 +13,7 @@ require (
|
||||
github.com/containernetworking/cni v1.1.2
|
||||
github.com/containernetworking/plugins v1.3.0
|
||||
github.com/containers/buildah v1.32.0
|
||||
github.com/containers/common v0.56.1-0.20230922104122-56ed984ea383
|
||||
github.com/containers/common v0.56.1-0.20230925164139-e18cda8d7750
|
||||
github.com/containers/conmon v2.0.20+incompatible
|
||||
github.com/containers/gvisor-tap-vsock v0.7.1-0.20230922151156-97028a6a6d6a
|
||||
github.com/containers/image/v5 v5.28.0
|
||||
|
4
go.sum
4
go.sum
@ -249,8 +249,8 @@ github.com/containernetworking/plugins v1.3.0 h1:QVNXMT6XloyMUoO2wUOqWTC1hWFV62Q
|
||||
github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0=
|
||||
github.com/containers/buildah v1.32.0 h1:uz5Rcf7lGeStj7iPTBgO4UdhQYZqMMzyt9suDf16k1k=
|
||||
github.com/containers/buildah v1.32.0/go.mod h1:sN3rA3DbnqekNz3bNdkqWduuirYDuMs54LUCOZOomBE=
|
||||
github.com/containers/common v0.56.1-0.20230922104122-56ed984ea383 h1:+SPOIY+DIO5nExB66n9aVWZi/yzcLpks6Ys4IwVxOLY=
|
||||
github.com/containers/common v0.56.1-0.20230922104122-56ed984ea383/go.mod h1:ABFEglmyt48WWWQv80kGhitfbVfR1Br35wk3gBQdrIk=
|
||||
github.com/containers/common v0.56.1-0.20230925164139-e18cda8d7750 h1:16M7tpn2zsrbJCYZ9ARjLerUQDg68pUGvWRFeTR0dhM=
|
||||
github.com/containers/common v0.56.1-0.20230925164139-e18cda8d7750/go.mod h1:ABFEglmyt48WWWQv80kGhitfbVfR1Br35wk3gBQdrIk=
|
||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||
github.com/containers/gvisor-tap-vsock v0.7.1-0.20230922151156-97028a6a6d6a h1:AytlbDLdlu6fZxulV3sHrXYQpQpkipNCZA6LGwcL37M=
|
||||
|
34
vendor/github.com/containers/common/pkg/filters/filters.go
generated
vendored
34
vendor/github.com/containers/common/pkg/filters/filters.go
generated
vendored
@ -107,13 +107,7 @@ func PrepareFilters(r *http.Request) (map[string][]string, error) {
|
||||
func MatchLabelFilters(filterValues []string, labels map[string]string) bool {
|
||||
outer:
|
||||
for _, filterValue := range filterValues {
|
||||
filterArray := strings.SplitN(filterValue, "=", 2)
|
||||
filterKey := filterArray[0]
|
||||
if len(filterArray) > 1 {
|
||||
filterValue = filterArray[1]
|
||||
} else {
|
||||
filterValue = ""
|
||||
}
|
||||
filterKey, filterValue := splitFilterValue(filterValue)
|
||||
for labelKey, labelValue := range labels {
|
||||
if filterValue == "" || labelValue == filterValue {
|
||||
if labelKey == filterKey || matchPattern(filterKey, labelKey) {
|
||||
@ -126,6 +120,32 @@ outer:
|
||||
return true
|
||||
}
|
||||
|
||||
// MatchNegatedLabelFilters matches negated labels and returns true if they are valid
|
||||
func MatchNegatedLabelFilters(filterValues []string, labels map[string]string) bool {
|
||||
for _, filterValue := range filterValues {
|
||||
filterKey, filterValue := splitFilterValue(filterValue)
|
||||
for labelKey, labelValue := range labels {
|
||||
if filterValue == "" || labelValue == filterValue {
|
||||
if labelKey == filterKey || matchPattern(filterKey, labelKey) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func splitFilterValue(filterValue string) (string, string) {
|
||||
filterArray := strings.SplitN(filterValue, "=", 2)
|
||||
filterKey := filterArray[0]
|
||||
if len(filterArray) > 1 {
|
||||
filterValue = filterArray[1]
|
||||
} else {
|
||||
filterValue = ""
|
||||
}
|
||||
return filterKey, filterValue
|
||||
}
|
||||
|
||||
func matchPattern(pattern string, value string) bool {
|
||||
if strings.Contains(pattern, "*") {
|
||||
filter := fmt.Sprintf("*%s*", pattern)
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -164,7 +164,7 @@ github.com/containers/buildah/pkg/sshagent
|
||||
github.com/containers/buildah/pkg/util
|
||||
github.com/containers/buildah/pkg/volumes
|
||||
github.com/containers/buildah/util
|
||||
# github.com/containers/common v0.56.1-0.20230922104122-56ed984ea383
|
||||
# github.com/containers/common v0.56.1-0.20230925164139-e18cda8d7750
|
||||
## explicit; go 1.18
|
||||
github.com/containers/common/libimage
|
||||
github.com/containers/common/libimage/define
|
||||
|
Reference in New Issue
Block a user