From 16008d37deb9610edcc9df62995fc1f7d892b666 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Thu, 11 Sep 2025 10:52:15 -0400 Subject: [PATCH] Fix GetByKey return type to match generic type --- typed/typedindexer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typed/typedindexer.go b/typed/typedindexer.go index cdd94d5..a42c65e 100644 --- a/typed/typedindexer.go +++ b/typed/typedindexer.go @@ -57,7 +57,7 @@ func (t Indexer[K]) Get(obj K) (item K, exists bool, err error) { return gotTypedObj, gotExists, gotErr } -func (t Indexer[K]) GetByKey(key string) (item interface{}, exists bool, err error) { +func (t Indexer[K]) GetByKey(key string) (item K, exists bool, err error) { var typedObj *K gotItem, gotExists, gotErr := t.indexer.GetByKey(key) if err != nil || !gotExists {