Skip to content

Commit 619ed20

Browse files
committed
fix: type print will always <nil>
1 parent 7982358 commit 619ed20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/cache/internal/cache_reader.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"k8s.io/apimachinery/pkg/runtime"
2828
"k8s.io/apimachinery/pkg/runtime/schema"
2929
"k8s.io/client-go/tools/cache"
30+
3031
"sigs.k8s.io/controller-runtime/pkg/internal/field/selector"
3132

3233
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -147,7 +148,7 @@ func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...cli
147148
}
148149
obj, isObj := item.(runtime.Object)
149150
if !isObj {
150-
return fmt.Errorf("cache contained %T, which is not an Object", obj)
151+
return fmt.Errorf("cache contained %T, which is not an Object", item)
151152
}
152153
meta, err := apimeta.Accessor(obj)
153154
if err != nil {

0 commit comments

Comments
 (0)