From 8093ad7fefd07c73e4f1b3260cc56507f9f3876b Mon Sep 17 00:00:00 2001
From: h3nryc0ding
Date: Mon, 23 Dec 2024 23:13:17 +0100
Subject: [PATCH] implement recommended changes
Signed-off-by: h3nryc0ding
---
internal/flags/helm_chart_source.go | 5 +++--
internal/flags/kustomization_source.go | 5 +++--
internal/flags/local_helm_chart_source.go | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/internal/flags/helm_chart_source.go b/internal/flags/helm_chart_source.go
index 246decee..30f2e379 100644
--- a/internal/flags/helm_chart_source.go
+++ b/internal/flags/helm_chart_source.go
@@ -64,9 +64,10 @@ func (s *HelmChartSource) Set(str string) error {
}
func (s *HelmChartSource) Type() string {
- return strings.Join(supportedHelmChartSourceKinds, "|")
+ return "/."
}
func (s *HelmChartSource) Description() string {
- return "source that contains the chart in the format '/.'"
+ return fmt.Sprintf("source that contains the chart, where kind must be one of: (%s)",
+ strings.Join(supportedHelmChartSourceKinds, ", "))
}
diff --git a/internal/flags/kustomization_source.go b/internal/flags/kustomization_source.go
index 408371ab..cb65c64d 100644
--- a/internal/flags/kustomization_source.go
+++ b/internal/flags/kustomization_source.go
@@ -71,9 +71,10 @@ func (s *KustomizationSource) Set(str string) error {
}
func (s *KustomizationSource) Type() string {
- return strings.Join(supportedKustomizationSourceKinds, "|")
+ return "[/]."
}
func (s *KustomizationSource) Description() string {
- return "source that contains the Kubernetes manifests in the format '[/].', if kind is not specified it defaults to GitRepository"
+ return fmt.Sprintf("source that contains the Kubernetes manifests, where kind must be one of: (%s), if kind is not specified it defaults to %s",
+ strings.Join(supportedKustomizationSourceKinds, ", "), sourcev1.GitRepositoryKind)
}
diff --git a/internal/flags/local_helm_chart_source.go b/internal/flags/local_helm_chart_source.go
index cdf7e689..a47221dd 100644
--- a/internal/flags/local_helm_chart_source.go
+++ b/internal/flags/local_helm_chart_source.go
@@ -58,9 +58,10 @@ func (s *LocalHelmChartSource) Set(str string) error {
}
func (s *LocalHelmChartSource) Type() string {
- return strings.Join(supportedHelmChartSourceKinds, "|")
+ return "/"
}
func (s *LocalHelmChartSource) Description() string {
- return "source that contains the chart in the format '/'"
+ return fmt.Sprintf("source that contains the chart, where kind must be one of: (%s)",
+ strings.Join(supportedHelmChartSourceKinds, ", "))
}