Fix fakeclient List

This commit is contained in:
wojtekt 2018-05-14 16:09:50 +02:00
parent b71fe87a5c
commit a4c35f31f2

View File

@ -334,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type
if label == nil {
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 {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)