From 704cb86de8c0af883e31b94ced8d28f120ff8f5b Mon Sep 17 00:00:00 2001 From: henrygd Date: Mon, 16 Mar 2026 17:44:45 -0400 Subject: [PATCH] refactor: change ExpiryMap.store to be a pointer --- internal/hub/expirymap/expirymap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/hub/expirymap/expirymap.go b/internal/hub/expirymap/expirymap.go index 0a3436bd..eed76756 100644 --- a/internal/hub/expirymap/expirymap.go +++ b/internal/hub/expirymap/expirymap.go @@ -16,7 +16,7 @@ type val[T comparable] struct { } type ExpiryMap[T comparable] struct { - store store.Store[string, val[T]] + store *store.Store[string, val[T]] stopChan chan struct{} stopOnce sync.Once } @@ -24,7 +24,7 @@ type ExpiryMap[T comparable] struct { // New creates a new expiry map with custom cleanup interval func New[T comparable](cleanupInterval time.Duration) *ExpiryMap[T] { m := &ExpiryMap[T]{ - store: *store.New(map[string]val[T]{}), + store: store.New(map[string]val[T]{}), stopChan: make(chan struct{}), } go m.startCleaner(cleanupInterval)