diff --git a/flag.go b/flag.go index 97e502c..b5241e0 100644 --- a/flag.go +++ b/flag.go @@ -624,8 +624,8 @@ func stringifyFlag(f Flag) string { defaultValueString := "" val := fv.FieldByName("Value") - if val.IsValid() && val.Kind() != reflect.Bool { - needsPlaceholder = true + if val.IsValid() { + needsPlaceholder = val.Kind() != reflect.Bool defaultValueString = fmt.Sprintf(" (default: %v)", val.Interface()) if val.Kind() == reflect.String && val.String() != "" { diff --git a/flag_test.go b/flag_test.go index a3414cf..ce786b7 100644 --- a/flag_test.go +++ b/flag_test.go @@ -14,8 +14,8 @@ var boolFlagTests = []struct { name string expected string }{ - {"help", "--help\t"}, - {"h", "-h\t"}, + {"help", "--help\t(default: false)"}, + {"h", "-h\t(default: false)"}, } func TestBoolFlagHelpOutput(t *testing.T) {