Extract the debug/namespace flags into run.Config [#67]

This is a general-purpose cleanup commit; every step except InitKube had
the same six "add the --debug and --namespace flags if applicable" code.
This commit is contained in:
Erin Call
2020-01-17 11:12:53 -08:00
parent a21848484b
commit 79532e7635
13 changed files with 31 additions and 258 deletions

View File

@@ -39,15 +39,7 @@ func (l *Lint) Prepare() error {
return fmt.Errorf("chart is required")
}
args := make([]string, 0)
if l.namespace != "" {
args = append(args, "--namespace", l.namespace)
}
if l.debug {
args = append(args, "--debug")
}
args := l.globalFlags()
args = append(args, "lint")
if l.values != "" {