From 0779042a6f1c749da8db11d1ab8c108340011188 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 27 Nov 2023 11:30:53 -0500 Subject: [PATCH] Remove a useless "_" assignment to appease the linter (This would become an error rather than a warning once we try to move this code to another file.) Also rename an "ok" variable to "exists" since that what it really means. --- pkg/proxy/service.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/proxy/service.go b/pkg/proxy/service.go index 5b591db26ae..e175fd85577 100644 --- a/pkg/proxy/service.go +++ b/pkg/proxy/service.go @@ -168,10 +168,10 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic } // v1.DeprecatedAnnotationTopologyAwareHints has precedence over v1.AnnotationTopologyMode. - var ok bool - info.hintsAnnotation, ok = service.Annotations[v1.DeprecatedAnnotationTopologyAwareHints] - if !ok { - info.hintsAnnotation, _ = service.Annotations[v1.AnnotationTopologyMode] + var exists bool + info.hintsAnnotation, exists = service.Annotations[v1.DeprecatedAnnotationTopologyAwareHints] + if !exists { + info.hintsAnnotation = service.Annotations[v1.AnnotationTopologyMode] } loadBalancerSourceRanges := make([]string, len(service.Spec.LoadBalancerSourceRanges))