Skip to content

Commit 16008d3

Browse files
committed
Fix GetByKey return type to match generic type
1 parent f039610 commit 16008d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

typed/typedindexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (t Indexer[K]) Get(obj K) (item K, exists bool, err error) {
5757
return gotTypedObj, gotExists, gotErr
5858
}
5959

60-
func (t Indexer[K]) GetByKey(key string) (item interface{}, exists bool, err error) {
60+
func (t Indexer[K]) GetByKey(key string) (item K, exists bool, err error) {
6161
var typedObj *K
6262
gotItem, gotExists, gotErr := t.indexer.GetByKey(key)
6363
if err != nil || !gotExists {

0 commit comments

Comments
 (0)