summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorDylan Allbee <[email protected]>2020-01-23 21:36:24 -0800
committerDylan Allbee <[email protected]>2020-01-25 11:53:34 -0800
commitc24567c12e7036f9f18c62ea13bb85b84e3d80ff (patch)
tree962851e5dcf77dc0f7da597b774b8118bb126600 /usage.go
parent5df19ebe00e88d443e062c6661f52b7069f486d7 (diff)
Fix lint warnings
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/usage.go b/usage.go
index c13835e..db43dd1 100644
--- a/usage.go
+++ b/usage.go
@@ -163,9 +163,7 @@ func (p *Parser) writeHelpForCommand(w io.Writer, cmd *command) {
var globals []*spec
ancestor := cmd.parent
for ancestor != nil {
- for _, spec := range ancestor.specs {
- globals = append(globals, spec)
- }
+ globals = append(globals, ancestor.specs...)
ancestor = ancestor.parent
}