commit | dabebe21bf790f782ea4c7bbd2efc430de182afd | [log] [tgz] |
---|---|---|
author | Eric Paris <eparis@redhat.com> | Tue Oct 18 19:08:44 2016 -0400 |
committer | GitHub <noreply@github.com> | Tue Oct 18 19:08:44 2016 -0400 |
tree | 98a4b6bf55b492cb5a5a4c4697c401d527876fa1 | |
parent | 0e7ce96826adebbd2556517e0a993030ef3a0c51 [diff] | |
parent | 7597b2702729ebb651fc9bb2adac40bcc62db82d [diff] |
Merge pull request #101 from dnephin/fix-default-value-of-string Don't print escaped strings for the default value of string
diff --git a/flag.go b/flag.go index d9aee57..fa81564 100644 --- a/flag.go +++ b/flag.go
@@ -534,7 +534,7 @@ line += usage if !flag.defaultIsZeroValue() { if flag.Value.Type() == "string" { - line += fmt.Sprintf(" (default %q)", flag.DefValue) + line += fmt.Sprintf(" (default \"%s\")", flag.DefValue) } else { line += fmt.Sprintf(" (default %s)", flag.DefValue) }