commit | 4b69d21313e8b16259f8fdac37156283b254c84b | [log] [tgz] |
---|---|---|
author | Eric Paris <eparis@redhat.com> | Sat Aug 15 14:28:31 2015 -0500 |
committer | Eric Paris <eparis@redhat.com> | Sat Aug 15 14:28:31 2015 -0500 |
tree | 7594f5d517b6585d961765443d6fa48c580f21a5 | |
parent | ccad0e1b8d442b5291ebbaa7d4f3b345a9dbfe65 [diff] | |
parent | 30f7e99b82e30299f499c1aa13638dd937e075f3 [diff] |
Merge pull request #45 from eparis/use-type Use Type() instead of internal .(*stringValue)
diff --git a/flag.go b/flag.go index 81b3c1f..c99ccf3 100644 --- a/flag.go +++ b/flag.go
@@ -387,7 +387,7 @@ if len(flag.NoOptDefVal) > 0 { format = format + "[" } - if _, ok := flag.Value.(*stringValue); ok { + if flag.Value.Type() == "string" { // put quotes on the value format = format + "=%q" } else {