Merge pull request #781 from saromanov/loop-refactoring

transformers/image: loop refactoring
This commit is contained in:
Kubernetes Prow Robot
2019-02-11 10:15:11 -08:00
committed by GitHub

View File

@@ -85,7 +85,9 @@ func (pt *imageTransformer) updateContainers(obj map[string]interface{}, path st
imageName := containerImage.(string)
for _, img := range pt.images {
if isImageMatched(imageName, img.Name) {
if !isImageMatched(imageName, img.Name) {
continue
}
name, tag := split(imageName)
if img.NewName != "" {
name = img.NewName
@@ -100,7 +102,6 @@ func (pt *imageTransformer) updateContainers(obj map[string]interface{}, path st
break
}
}
}
return nil
}