File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -567,7 +567,11 @@ func (tabularTemplate) Prettify(s string) string {
567567// cli.BoolFlag will always return an default.
568568func getFlagDefaultValue (f cli.DocGenerationFlag ) (value , text string ) {
569569 if defaultText := f .GetDefaultText (); defaultText != "" {
570- return "" , strings .Trim (defaultText , "\" " )
570+ if _ , ok := f .(* cli.StringFlag ); ok {
571+ return "" , strings .Trim (defaultText , "\" " )
572+ } else {
573+ return "" , defaultText
574+ }
571575 }
572576
573577 if ! f .TakesValue () {
@@ -578,7 +582,11 @@ func getFlagDefaultValue(f cli.DocGenerationFlag) (value, text string) {
578582 }
579583
580584 if value := f .GetValue (); value != "" {
581- return strings .Trim (value , "\" " ), ""
585+ if _ , ok := f .(* cli.StringFlag ); ok {
586+ return strings .Trim (value , "\" " ), ""
587+ } else {
588+ return value , ""
589+ }
582590 }
583591 return "" , ""
584592}
You can’t perform that action at this time.
0 commit comments