Fix display of default value in placeholder.

This commit is contained in:
Alec Thomas
2018-06-06 18:13:36 +10:00
parent 891f8623c1
commit d559a6a785
+3 -3
View File
@@ -223,14 +223,14 @@ func (f *Flag) FormatPlaceHolder() string {
if f.Value.IsCumulative() {
tail += ", ..."
}
if f.PlaceHolder != "" {
return f.PlaceHolder + tail
}
if f.Default != "" {
if f.Value.Value.Kind() == reflect.String {
return strconv.Quote(f.Default) + tail
}
return f.Default + tail
}
if f.PlaceHolder != "" {
return f.PlaceHolder + tail
}
return strings.ToUpper(f.Name) + tail
}