mirror of
https://github.com/containers/podman.git
synced 2025-12-05 04:40:47 +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:
6
vendor/github.com/containers/common/libnetwork/resolvconf/resolv.go
generated
vendored
6
vendor/github.com/containers/common/libnetwork/resolvconf/resolv.go
generated
vendored
@@ -7,9 +7,9 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/common/pkg/util"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -111,7 +111,7 @@ func getDefaultResolvConf(params *Params) ([]byte, bool, error) {
|
||||
|
||||
// unsetSearchDomainsIfNeeded removes the search domain when they contain a single dot as element.
|
||||
func unsetSearchDomainsIfNeeded(searches []string) []string {
|
||||
if util.StringInSlice(".", searches) {
|
||||
if slices.Contains(searches, ".") {
|
||||
return nil
|
||||
}
|
||||
return searches
|
||||
@@ -173,7 +173,7 @@ func Remove(path string, nameservers []string) error {
|
||||
oldNameservers := getNameservers(contents)
|
||||
newNameserver := make([]string, 0, len(oldNameservers))
|
||||
for _, ns := range oldNameservers {
|
||||
if !util.StringInSlice(ns, nameservers) {
|
||||
if !slices.Contains(nameservers, ns) {
|
||||
newNameserver = append(newNameserver, ns)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user