We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0cc5c2 commit 57cbb2dCopy full SHA for 57cbb2d
docs.go
@@ -153,9 +153,14 @@ func prepareFlags(
153
// flagDetails returns a string containing the flags metadata
154
func flagDetails(flag DocGenerationFlag) string {
155
description := flag.GetUsage()
156
- value := flag.GetValue()
157
- if value != "" {
158
- description += " (default: " + value + ")"
+ if flag.TakesValue() {
+ defaultText := flag.GetDefaultText()
+ if defaultText == "" {
159
+ defaultText = flag.GetValue()
160
+ }
161
+ if defaultText != "" {
162
+ description += " (default: " + defaultText + ")"
163
164
}
165
return ": " + description
166
0 commit comments