Commit 4dcc92e4 authored by hzxuzhonghu's avatar hzxuzhonghu

remove dead code in pkg/api

parent f3024879
...@@ -168,14 +168,6 @@ func LessEndpointAddress(a, b *api.EndpointAddress) bool { ...@@ -168,14 +168,6 @@ func LessEndpointAddress(a, b *api.EndpointAddress) bool {
return a.TargetRef.UID < b.TargetRef.UID return a.TargetRef.UID < b.TargetRef.UID
} }
type addrPtrsByIpAndUID []*api.EndpointAddress
func (sl addrPtrsByIpAndUID) Len() int { return len(sl) }
func (sl addrPtrsByIpAndUID) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
func (sl addrPtrsByIpAndUID) Less(i, j int) bool {
return LessEndpointAddress(sl[i], sl[j])
}
// SortSubsets sorts an array of EndpointSubset objects in place. For ease of // SortSubsets sorts an array of EndpointSubset objects in place. For ease of
// use it returns the input slice. // use it returns the input slice.
func SortSubsets(subsets []api.EndpointSubset) []api.EndpointSubset { func SortSubsets(subsets []api.EndpointSubset) []api.EndpointSubset {
......
...@@ -169,14 +169,6 @@ func LessEndpointAddress(a, b *v1.EndpointAddress) bool { ...@@ -169,14 +169,6 @@ func LessEndpointAddress(a, b *v1.EndpointAddress) bool {
return a.TargetRef.UID < b.TargetRef.UID return a.TargetRef.UID < b.TargetRef.UID
} }
type addrPtrsByIpAndUID []*v1.EndpointAddress
func (sl addrPtrsByIpAndUID) Len() int { return len(sl) }
func (sl addrPtrsByIpAndUID) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
func (sl addrPtrsByIpAndUID) Less(i, j int) bool {
return LessEndpointAddress(sl[i], sl[j])
}
// SortSubsets sorts an array of EndpointSubset objects in place. For ease of // SortSubsets sorts an array of EndpointSubset objects in place. For ease of
// use it returns the input slice. // use it returns the input slice.
func SortSubsets(subsets []v1.EndpointSubset) []v1.EndpointSubset { func SortSubsets(subsets []v1.EndpointSubset) []v1.EndpointSubset {
......
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