From 18935dcfdde4697720cf10d002a6bc878514b258 Mon Sep 17 00:00:00 2001 From: Harsh Thakur Date: Fri, 18 Jun 2021 08:11:23 +0000 Subject: [PATCH] Lint fix (#2074) Signed-off-by: Harsh Thakur Co-authored-by: Sanket Sudake --- pkg/router/functionHandler.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/router/functionHandler.go b/pkg/router/functionHandler.go index 2f939a7a..10da3deb 100644 --- a/pkg/router/functionHandler.go +++ b/pkg/router/functionHandler.go @@ -574,13 +574,16 @@ func (fh functionHandler) getServiceEntryFromCache() (serviceUrl *url.URL, err e } // addServiceEntryToCache add service url entry to cache -func (fn functionHandler) addServiceEntryToCache(serviceUrl *url.URL) { - fn.fmap.assign(&fn.function.ObjectMeta, serviceUrl) +func (fh functionHandler) addServiceEntryToCache(serviceURL *url.URL) { + fh.fmap.assign(&fh.function.ObjectMeta, serviceURL) } // removeServiceEntryFromCache removes service url entry from cache -func (fn functionHandler) removeServiceEntryFromCache() { - fn.fmap.remove(&fn.function.ObjectMeta) +func (fh functionHandler) removeServiceEntryFromCache() { + err := fh.fmap.remove(&fh.function.ObjectMeta) + if err != nil { + fh.logger.Error("Error removing key:", zap.Error(err)) + } } func (fh functionHandler) getServiceEntryFromExecutor() (serviceUrl *url.URL, err error) {