Skip to content

Commit

Permalink
Remove DeepCopy, as suggested during code review
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
  • Loading branch information
wallrj authored and k8s-infra-cherrypick-robot committed Feb 10, 2022
1 parent bad563a commit e11297b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/cache/internal/informers_map.go
Expand Up @@ -429,11 +429,9 @@ func createMetadataListWatch(gvk schema.GroupVersionKind, ip *specificInformersM
func newGVKFixupWatcher(gvk schema.GroupVersionKind, watcher watch.Interface) watch.Interface {
return watch.Filter(
watcher,
func(in watch.Event) (out watch.Event, keep bool) {
keep = true
in.DeepCopyInto(&out)
out.Object.GetObjectKind().SetGroupVersionKind(gvk)
return out, keep
func(in watch.Event) (watch.Event, bool) {
in.Object.GetObjectKind().SetGroupVersionKind(gvk)
return in, true
},
)
}
Expand Down

0 comments on commit e11297b

Please sign in to comment.