Merge pull request #104819 from justinsb/less_cmp

Use utils string-slice comparison
This commit is contained in:
Kubernetes Prow Robot 2022-01-05 10:34:00 -08:00 committed by GitHub
commit a0d638bd79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -37,6 +37,7 @@
- k8s.io/kube-openapi
- k8s.io/utils/clock
- k8s.io/utils/net
- k8s.io/utils/strings
- k8s.io/klog
- baseImportPath: "./vendor/k8s.io/api/"

View File

@ -22,12 +22,12 @@ import (
"strconv"
"strings"
"github.com/google/go-cmp/cmp"
"k8s.io/apimachinery/pkg/selection"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/klog/v2"
stringslices "k8s.io/utils/strings/slices"
)
var (
@ -288,7 +288,7 @@ func (r Requirement) Equal(x Requirement) bool {
if r.operator != x.operator {
return false
}
return cmp.Equal(r.strValues, x.strValues)
return stringslices.Equal(r.strValues, x.strValues)
}
// Empty returns true if the internalSelector doesn't restrict selection space