Skip to content

Commit b2c5e38

Browse files
authored
Merge pull request #2256 from qmloong/qmloong/fix-type-print
🐛 type print will always <nil>
2 parents 7982358 + c00d5d0 commit b2c5e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cache/internal/cache_reader.go

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

3231
"sigs.k8s.io/controller-runtime/pkg/client"
32+
"sigs.k8s.io/controller-runtime/pkg/internal/field/selector"
3333
)
3434

3535
// CacheReader is a client.Reader.
@@ -147,7 +147,7 @@ func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...cli
147147
}
148148
obj, isObj := item.(runtime.Object)
149149
if !isObj {
150-
return fmt.Errorf("cache contained %T, which is not an Object", obj)
150+
return fmt.Errorf("cache contained %T, which is not an Object", item)
151151
}
152152
meta, err := apimeta.Accessor(obj)
153153
if err != nil {

0 commit comments

Comments
 (0)