aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
authorEric Paris <[email protected]>2016-10-18 19:08:44 -0400
committerGitHub <[email protected]>2016-10-18 19:08:44 -0400
commitdabebe21bf790f782ea4c7bbd2efc430de182afd (patch)
tree98a4b6bf55b492cb5a5a4c4697c401d527876fa1 /flag.go
parent0e7ce96826adebbd2556517e0a993030ef3a0c51 (diff)
parent7597b2702729ebb651fc9bb2adac40bcc62db82d (diff)
Merge pull request #101 from dnephin/fix-default-value-of-string
Don't print escaped strings for the default value of string
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/flag.go b/flag.go
index d9aee57..fa81564 100644
--- a/flag.go
+++ b/flag.go
@@ -534,7 +534,7 @@ func (f *FlagSet) FlagUsages() string {
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)
}