mirror of
https://github.com/containers/podman.git
synced 2025-12-04 20:28:40 +08:00
Vendor in latest c/common
Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
3
vendor/github.com/containers/common/libnetwork/util/filters.go
generated
vendored
3
vendor/github.com/containers/common/libnetwork/util/filters.go
generated
vendored
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/containers/common/libnetwork/types"
|
||||
"github.com/containers/common/pkg/filters"
|
||||
"github.com/containers/common/pkg/util"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
func GenerateNetworkFilters(f map[string][]string) ([]types.FilterFunc, error) {
|
||||
@@ -32,7 +33,7 @@ func createFilterFuncs(key string, filterValues []string) (types.FilterFunc, err
|
||||
case types.Driver:
|
||||
// matches network driver
|
||||
return func(net types.Network) bool {
|
||||
return util.StringInSlice(net.Driver, filterValues)
|
||||
return slices.Contains(filterValues, net.Driver)
|
||||
}, nil
|
||||
|
||||
case "id":
|
||||
|
||||
Reference in New Issue
Block a user