Skip to content

Commit

Permalink
refactor stringSlice type CLI arguments
Browse files Browse the repository at this point in the history
Signed-off-by: JieJhih Jhang <jiejhihjhang@gmail.com>
  • Loading branch information
LexCC authored and tgraf committed Jul 9, 2020
1 parent 678e7f0 commit 9fe5b33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/option/config.go
Expand Up @@ -1231,7 +1231,12 @@ func LogRegisteredOptions(entry *logrus.Entry) {
}
sort.Strings(keys)
for _, k := range keys {
entry.Infof(" --%s='%s'", k, viper.GetString(k))
v := viper.GetStringSlice(k)
if len(v) > 0 {
entry.Infof(" --%s='%s'", k, strings.Join(v, ","))
} else {
entry.Infof(" --%s='%s'", k, viper.GetString(k))
}
}
}

Expand Down

0 comments on commit 9fe5b33

Please sign in to comment.