mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-11 02:07:30 +00:00
improve flag descriptions to show allowed values instead of internal type names
Signed-off-by: h3nryc0ding <hr.richterhenry@gmail.com>
This commit is contained in:
parent
2a5948fe42
commit
de7e9ff619
12 changed files with 16 additions and 12 deletions
|
|
@ -52,7 +52,7 @@ func (a *CRDsPolicy) Set(str string) error {
|
|||
}
|
||||
|
||||
func (a *CRDsPolicy) Type() string {
|
||||
return "crds"
|
||||
return strings.Join(supportedCRDsPolicies, "|")
|
||||
}
|
||||
|
||||
func (a *CRDsPolicy) Description() string {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func (d *DecryptionProvider) Set(str string) error {
|
|||
}
|
||||
|
||||
func (d *DecryptionProvider) Type() string {
|
||||
return "decryptionProvider"
|
||||
return strings.Join(supportedDecryptionProviders, "|")
|
||||
}
|
||||
|
||||
func (d *DecryptionProvider) Description() string {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func (c *ECDSACurve) Set(str string) error {
|
|||
}
|
||||
|
||||
func (c *ECDSACurve) Type() string {
|
||||
return "ecdsaCurve"
|
||||
return strings.Join(ecdsaCurves(), "|")
|
||||
}
|
||||
|
||||
func (c *ECDSACurve) Description() string {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,11 @@ func (d *GitLabVisibility) Set(str string) error {
|
|||
}
|
||||
|
||||
func (d *GitLabVisibility) Type() string {
|
||||
return "gitLabVisibility"
|
||||
visibilities := make([]string, 0, len(supportedGitLabVisibilities))
|
||||
for visibility := range supportedGitLabVisibilities {
|
||||
visibilities = append(visibilities, string(visibility))
|
||||
}
|
||||
return strings.Join(visibilities, "|")
|
||||
}
|
||||
|
||||
func (d *GitLabVisibility) Description() string {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ func (s *HelmChartSource) Set(str string) error {
|
|||
}
|
||||
|
||||
func (s *HelmChartSource) Type() string {
|
||||
return "helmChartSource"
|
||||
return strings.Join(supportedHelmChartSourceKinds, "|")
|
||||
}
|
||||
|
||||
func (s *HelmChartSource) Description() string {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (s *KustomizationSource) Set(str string) error {
|
|||
}
|
||||
|
||||
func (s *KustomizationSource) Type() string {
|
||||
return "kustomizationSource"
|
||||
return strings.Join(supportedKustomizationSourceKinds, "|")
|
||||
}
|
||||
|
||||
func (s *KustomizationSource) Description() string {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ func (s *LocalHelmChartSource) Set(str string) error {
|
|||
}
|
||||
|
||||
func (s *LocalHelmChartSource) Type() string {
|
||||
return "helmChartSource"
|
||||
return strings.Join(supportedHelmChartSourceKinds, "|")
|
||||
}
|
||||
|
||||
func (s *LocalHelmChartSource) Description() string {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func (l *LogLevel) Set(str string) error {
|
|||
}
|
||||
|
||||
func (l *LogLevel) Type() string {
|
||||
return "logLevel"
|
||||
return strings.Join(supportedLogLevels, "|")
|
||||
}
|
||||
|
||||
func (l *LogLevel) Description() string {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ func (a *PublicKeyAlgorithm) Set(str string) error {
|
|||
}
|
||||
|
||||
func (a *PublicKeyAlgorithm) Type() string {
|
||||
return "publicKeyAlgorithm"
|
||||
return strings.Join(supportedPublicKeyAlgorithms, "|")
|
||||
}
|
||||
|
||||
func (a *PublicKeyAlgorithm) Description() string {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ func (p *SourceBucketProvider) Set(str string) error {
|
|||
}
|
||||
|
||||
func (p *SourceBucketProvider) Type() string {
|
||||
return "sourceBucketProvider"
|
||||
return strings.Join(supportedSourceBucketProviders, "|")
|
||||
}
|
||||
|
||||
func (p *SourceBucketProvider) Description() string {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func (p *SourceOCIProvider) Set(str string) error {
|
|||
}
|
||||
|
||||
func (p *SourceOCIProvider) Type() string {
|
||||
return "sourceOCIProvider"
|
||||
return strings.Join(supportedSourceOCIProviders, "|")
|
||||
}
|
||||
|
||||
func (p *SourceOCIProvider) Description() string {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func (p *SourceOCIVerifyProvider) Set(str string) error {
|
|||
}
|
||||
|
||||
func (p *SourceOCIVerifyProvider) Type() string {
|
||||
return "sourceOCIVerifyProvider"
|
||||
return strings.Join(supportedSourceOCIVerifyProviders, "|")
|
||||
}
|
||||
|
||||
func (p *SourceOCIVerifyProvider) Description() string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue