File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,9 @@ func (tt tabularTemplate) PrepareFlags(flags []cli.Flag) []cliTabularFlagTemplat
411411 } else if value != "" {
412412 defaultValue = fmt .Sprintf ("`%s`" , value )
413413 }
414+ if boolFlag , isBool := appFlag .(* cli.BoolFlag ); isBool && defaultText == "" {
415+ defaultValue = fmt .Sprintf ("`%s`" , strconv .FormatBool (boolFlag .Value ))
416+ }
414417
415418 f := cliTabularFlagTemplate {
416419 Usage : tt .PrepareMultilineString (flag .GetUsage ()),
@@ -420,10 +423,6 @@ func (tt tabularTemplate) PrepareFlags(flags []cli.Flag) []cliTabularFlagTemplat
420423 Type : flag .TypeName (),
421424 }
422425
423- if boolFlag , isBool := appFlag .(* cli.BoolFlag ); isBool && defaultText == "" {
424- f .Default = fmt .Sprintf ("`%s`" , strconv .FormatBool (boolFlag .Value ))
425- }
426-
427426 for i , name := range appFlag .Names () {
428427 name = strings .TrimSpace (name )
429428
You can’t perform that action at this time.
0 commit comments