using own usage func #42

Merged
vtolstov merged 3 commits from usage into v3 2022-04-02 15:22:13 +03:00
Showing only changes of commit 26d5fc5c0e - Show all commits

View File

@ -214,7 +214,7 @@ func (c *flagConfig) usage() {
}
b.WriteString(strings.ReplaceAll(usage, "\n", "\n \t"))
if rutil.IsZero(f.Value) || f.Value.String() == f.DefValue {
if f.Value.String() == f.DefValue {
fmt.Fprintf(&b, " (default %q)", f.DefValue)
} else {
fmt.Fprintf(&b, " (default %q current %q)", f.DefValue, f.Value)