From 68416bdf29d8dd97b7ed3b30e8ba1076907e16f9 Mon Sep 17 00:00:00 2001 From: hchiramm Date: Fri, 11 Jan 2019 16:25:50 +0530 Subject: [PATCH] Remove explicit `nil` declaration of some variables in endpoint ctrl. Signed-off-by: hchiramm --- pkg/controller/endpoint/endpoints_controller.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 403bd9c0eee..a92d698330d 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -428,8 +428,8 @@ func (e *EndpointController) syncService(key string) error { } subsets := []v1.EndpointSubset{} - var totalReadyEps int = 0 - var totalNotReadyEps int = 0 + var totalReadyEps int + var totalNotReadyEps int for _, pod := range pods { if len(pod.Status.PodIP) == 0 { @@ -559,8 +559,8 @@ func (e *EndpointController) checkLeftoverEndpoints() { func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.EndpointAddress, epp *v1.EndpointPort, tolerateUnreadyEndpoints bool) ([]v1.EndpointSubset, int, int) { - var readyEps int = 0 - var notReadyEps int = 0 + var readyEps int + var notReadyEps int ports := []v1.EndpointPort{} if epp != nil { ports = append(ports, *epp)