mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #104819 from justinsb/less_cmp
Use utils string-slice comparison
This commit is contained in:
commit
a0d638bd79
@ -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/"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user