diff options
| author | Pasha Kostohrys <pavel@codefresh.io> | 2024-05-29 18:14:00 +0300 |
|---|---|---|
| committer | Pasha Kostohrys <pavel@codefresh.io> | 2024-05-29 18:14:00 +0300 |
| commit | 4a08ed6c733a7fa8c7809419e3301200771a4a96 (patch) | |
| tree | 7a0186eacd86d99ca30ae40fdcadcad5d7803d97 /pkg | |
| parent | bdcecc1bd09adab329e47750edb108371ca30cd1 (diff) | |
optimize code
Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/argocd/argocd.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pkg/argocd/argocd.go b/pkg/argocd/argocd.go index 1a389e3..2603903 100644 --- a/pkg/argocd/argocd.go +++ b/pkg/argocd/argocd.go @@ -318,20 +318,17 @@ func getHelmParamNamesFromAnnotation(annotations map[string]string, img *image.C var annotationName, helmParamName, helmParamVersion string // Image spec is a full-qualified specifier, if we have it, we return early - param := img.GetParameterHelmImageSpec(annotations) - if param != "" { + if param := img.GetParameterHelmImageSpec(annotations); param != "" { log.Tracef("found annotation %s", annotationName) return strings.TrimSpace(param), "" } - param = img.GetParameterHelmImageName(annotations) - if param != "" { + if param := img.GetParameterHelmImageName(annotations); param != "" { log.Tracef("found annotation %s", annotationName) helmParamName = param } - param = img.GetParameterHelmImageTag(annotations) - if param != "" { + if param := img.GetParameterHelmImageTag(annotations); param != "" { log.Tracef("found annotation %s", annotationName) helmParamVersion = param } |
