mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
Use "==" instead of DeepEqual for simple structs comparing.
This commit is contained in:
parent
0c7ef059db
commit
e6ad515315
@ -22,7 +22,6 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"reflect"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
@ -461,7 +460,7 @@ func containsNumber(haystack []int, needle int) bool {
|
|||||||
// so small that we expect a linear search to be faster
|
// so small that we expect a linear search to be faster
|
||||||
func containsNodePort(serviceNodePorts []ServiceNodePort, serviceNodePort ServiceNodePort) bool {
|
func containsNodePort(serviceNodePorts []ServiceNodePort, serviceNodePort ServiceNodePort) bool {
|
||||||
for _, snp := range serviceNodePorts {
|
for _, snp := range serviceNodePorts {
|
||||||
if reflect.DeepEqual(snp, serviceNodePort) {
|
if snp == serviceNodePort {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user