From 5bdadb923503bbf36a6d9b371703a880436e4a34 Mon Sep 17 00:00:00 2001 From: Kent Rancourt Date: Thu, 14 Nov 2024 17:41:00 -0500 Subject: [PATCH] apply @hiddeco feedback Signed-off-by: Kent Rancourt --- internal/directives/argocd_updater.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/directives/argocd_updater.go b/internal/directives/argocd_updater.go index 1ae0aeccb..540e46036 100644 --- a/internal/directives/argocd_updater.go +++ b/internal/directives/argocd_updater.go @@ -816,11 +816,12 @@ func (a *argocdUpdater) buildKustomizeImagesForAppSource( for i := range update.Images { imageUpdate := &update.Images[i] var digest, tag string - if imageUpdate.Digest != "" { + switch { + case imageUpdate.Digest != "": digest = imageUpdate.Digest - } else if imageUpdate.Tag != "" { + case imageUpdate.Tag != "": tag = imageUpdate.Tag - } else { + default: desiredOrigin := getDesiredOrigin(stepCfg, imageUpdate) image, err := freight.FindImage( ctx,