Commit a4c35f31 authored by wojtekt's avatar wojtekt

Fix fakeclient List

parent b71fe87a
...@@ -334,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type ...@@ -334,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type
if label == nil { if label == nil {
label = $.Everything|raw$() label = $.Everything|raw$()
} }
list := &$.type|raw$List{} list := &$.type|raw$List{ListMeta: obj.(*$.type|raw$List).ListMeta}
for _, item := range obj.(*$.type|raw$List).Items { for _, item := range obj.(*$.type|raw$List).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment