fix cobra flag default value

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-08-06 15:04:34 +08:00
parent 329ec766fe
commit 8beb69d08e
16 changed files with 52 additions and 52 deletions
+2 -2
View File
@@ -31,8 +31,8 @@ func NewTemplateCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.StringVar(&templateOptions.Args, "args", "", "pass args to helm template")
f.StringArrayVar(&templateOptions.Set, "set", []string{}, "additional values to be merged into the command")
f.StringArrayVar(&templateOptions.Values, "values", []string{}, "additional value files to be merged into the command")
f.StringArrayVar(&templateOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&templateOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringVar(&templateOptions.OutputDir, "output-dir", "", "output directory to pass to helm template (helm template --output-dir)")
f.StringVar(&templateOptions.OutputDirTemplate, "output-dir-template", "", "go text template for generating the output directory. Default: {{ .OutputDir }}/{{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}-{{ .Release.Name}}")
f.IntVar(&templateOptions.Concurrency, "concurrency", 0, "maximum number of concurrent downloads of release charts")