Commit e6ad5153 authored by xiangpengzhao's avatar xiangpengzhao

Use "==" instead of DeepEqual for simple structs comparing.

parent 0c7ef059
...@@ -22,7 +22,6 @@ import ( ...@@ -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 { ...@@ -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
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment