Check all places to break the loop when object found

This commit is contained in:
lixiaobing10051267
2016-07-23 13:49:04 +08:00
parent 0e8d515225
commit be8d081539
5 changed files with 5 additions and 0 deletions

View File

@@ -350,6 +350,7 @@ func (t *tracker) Delete(gvk unversioned.GroupVersionKind, ns, name string) erro
if objMeta.GetNamespace() == ns && objMeta.GetName() == name {
t.objects[gvk] = append(t.objects[gvk][:i], t.objects[gvk][i+1:]...)
found = true
break
}
}