summaryrefslogtreecommitdiff
path: root/subcommand.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 /subcommand.go
parentbd97edec87a0541321c6e2529150e315ee11cd8b (diff)
no need to initialize nil structs during path traversal
Diffstat (limited to 'subcommand.go')
-rw-r--r--subcommand.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/subcommand.go b/subcommand.go
index b73e933..dff732c 100644
--- a/subcommand.go
+++ b/subcommand.go
@@ -10,7 +10,7 @@ func (p *Parser) Subcommand() interface{} {
if p.lastCmd == nil || p.lastCmd.parent == nil {
return nil
}
- return p.readable(p.lastCmd.dest).Interface()
+ return p.val(p.lastCmd.dest).Interface()
}
// SubcommandNames returns the sequence of subcommands specified by the