summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2019-05-03 16:32:16 -0700
committerAlex Flint <[email protected]>2019-05-03 16:32:16 -0700
commit990e87d80d9989dd2fbac4db21c8527e1f17cea3 (patch)
tree1f5cb6635feef64b29e41d62cc0e9893d62a9e3d /usage.go
parentbd97edec87a0541321c6e2529150e315ee11cd8b (diff)
no need to initialize nil structs during path traversal
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/usage.go b/usage.go
index 1f6b569..33b6184 100644
--- a/usage.go
+++ b/usage.go
@@ -179,7 +179,7 @@ func (p *Parser) printOption(w io.Writer, spec *spec) {
// If spec.dest is not the zero value then a default value has been added.
var v reflect.Value
if len(spec.dest.fields) > 0 {
- v = p.readable(spec.dest)
+ v = p.val(spec.dest)
}
var defaultVal *string