Skip to content

Commit 5c7215d

Browse files
committed
fact(service.go): modernize interface{} -> any
1 parent 36b3a3a commit 5c7215d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/utils/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func ServiceNameforEndpointSlice(es *discoveryv1.EndpointSlice) (string, error)
7373
}
7474

7575
// ServiceForEndpoints given EndpointSlice object return Service API object if it exists
76-
func ServiceForEndpointSlice(ci *cache.Indexer, es *discoveryv1.EndpointSlice) (interface{}, bool, error) {
76+
func ServiceForEndpointSlice(ci *cache.Indexer, es *discoveryv1.EndpointSlice) (any, bool, error) {
7777
svcName, err := ServiceNameforEndpointSlice(es)
7878
if err != nil {
7979
return nil, false, err
@@ -99,7 +99,7 @@ func ServiceForEndpointSlice(ci *cache.Indexer, es *discoveryv1.EndpointSlice) (
9999
// kube-router as there is no need to execute logic on most headless changes. Function takes a generic interface as its
100100
// input parameter so that it can be used more easily in early processing if needed. If a non-service object is given,
101101
// function will return false.
102-
func ServiceHasNoClusterIP(obj interface{}) bool {
102+
func ServiceHasNoClusterIP(obj any) bool {
103103
if svc, _ := obj.(*v1core.Service); svc != nil {
104104
if svc.Spec.Type == v1core.ServiceTypeClusterIP {
105105
if ClusterIPIsNone(svc.Spec.ClusterIP) && containsOnlyNone(svc.Spec.ClusterIPs) {

0 commit comments

Comments
 (0)