diff --git a/pkg/util/templates/templater.go b/pkg/util/templates/templater.go index c8036ac1..b55adc6b 100644 --- a/pkg/util/templates/templater.go +++ b/pkg/util/templates/templater.go @@ -225,10 +225,10 @@ func flagsUsages(f *flag.FlagSet) string { if flag.Hidden { return } - format := "--%s=%s: %s\n" + format := "--%s=%s: %s%s\n" if flag.Value.Type() == "string" { - format = "--%s='%s': %s\n" + format = "--%s='%s': %s%s\n" } if len(flag.Shorthand) > 0 { @@ -237,7 +237,12 @@ func flagsUsages(f *flag.FlagSet) string { format = " %s " + format } - fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage) + deprecated := "" + if flag.Deprecated != "" { + deprecated = fmt.Sprintf(" (DEPRECATED: %s)", flag.Deprecated) + } + + fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage, deprecated) }) return x.String()