Skip to content

Commit e11297b

Browse files
wallrjk8s-infra-cherrypick-robot
authored and
k8s-infra-cherrypick-robot
committed
Remove DeepCopy, as suggested during code review
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
1 parent bad563a commit e11297b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/cache/internal/informers_map.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,9 @@ func createMetadataListWatch(gvk schema.GroupVersionKind, ip *specificInformersM
429429
func newGVKFixupWatcher(gvk schema.GroupVersionKind, watcher watch.Interface) watch.Interface {
430430
return watch.Filter(
431431
watcher,
432-
func(in watch.Event) (out watch.Event, keep bool) {
433-
keep = true
434-
in.DeepCopyInto(&out)
435-
out.Object.GetObjectKind().SetGroupVersionKind(gvk)
436-
return out, keep
432+
func(in watch.Event) (watch.Event, bool) {
433+
in.Object.GetObjectKind().SetGroupVersionKind(gvk)
434+
return in, true
437435
},
438436
)
439437
}

0 commit comments

Comments
 (0)