diff options
| author | Alex Flint <[email protected]> | 2019-05-03 16:32:16 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2019-05-03 16:32:16 -0700 |
| commit | 990e87d80d9989dd2fbac4db21c8527e1f17cea3 (patch) | |
| tree | 1f5cb6635feef64b29e41d62cc0e9893d62a9e3d /subcommand.go | |
| parent | bd97edec87a0541321c6e2529150e315ee11cd8b (diff) | |
no need to initialize nil structs during path traversal
Diffstat (limited to 'subcommand.go')
| -rw-r--r-- | subcommand.go | 2 |
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 |
