Handles the case of merging pflag intSlices

This commit is contained in:
M 2018-04-02 13:30:26 -04:00
parent 1d33b640d9
commit bd294940f9

View file

@ -930,6 +930,11 @@ func (v *Viper) find(lcaseKey string) interface{} {
s = strings.TrimSuffix(s, "]")
res, _ := readAsCSV(s)
return res
case "intSlice":
s := strings.TrimPrefix(flag.ValueString(), "[")
s = strings.TrimSuffix(s, "]")
res, _ := readAsCSV(s)
return res
default:
return flag.ValueString()
}