From 1d60557c8720c3ae0a23ddf691f6b7c50e90e20b Mon Sep 17 00:00:00 2001 From: Jacob Tanenbaum Date: Thu, 4 Apr 2019 14:41:15 -0400 Subject: [PATCH] Merge() and Unmerge() needlessly exported --- pkg/proxy/endpoints.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/proxy/endpoints.go b/pkg/proxy/endpoints.go index 713f7e17ebe..c203199e460 100644 --- a/pkg/proxy/endpoints.go +++ b/pkg/proxy/endpoints.go @@ -290,8 +290,8 @@ func (em EndpointsMap) apply(changes *EndpointChangeTracker, staleEndpoints *[]S changes.lock.Lock() defer changes.lock.Unlock() for _, change := range changes.items { - em.Unmerge(change.previous) - em.Merge(change.current) + em.unmerge(change.previous) + em.merge(change.current) detectStaleConnections(change.previous, change.current, staleEndpoints, staleServiceNames) } changes.items = make(map[types.NamespacedName]*endpointsChange) @@ -302,14 +302,14 @@ func (em EndpointsMap) apply(changes *EndpointChangeTracker, staleEndpoints *[]S } // Merge ensures that the current EndpointsMap contains all pairs from the EndpointsMap passed in. -func (em EndpointsMap) Merge(other EndpointsMap) { +func (em EndpointsMap) merge(other EndpointsMap) { for svcPortName := range other { em[svcPortName] = other[svcPortName] } } // Unmerge removes the pairs from the current EndpointsMap which are contained in the EndpointsMap passed in. -func (em EndpointsMap) Unmerge(other EndpointsMap) { +func (em EndpointsMap) unmerge(other EndpointsMap) { for svcPortName := range other { delete(em, svcPortName) }