diff options
| author | Dylan Allbee <[email protected]> | 2020-01-23 21:36:24 -0800 |
|---|---|---|
| committer | Dylan Allbee <[email protected]> | 2020-01-25 11:53:34 -0800 |
| commit | c24567c12e7036f9f18c62ea13bb85b84e3d80ff (patch) | |
| tree | 962851e5dcf77dc0f7da597b774b8118bb126600 | |
| parent | 5df19ebe00e88d443e062c6661f52b7069f486d7 (diff) | |
Fix lint warnings
| -rw-r--r-- | usage.go | 4 | ||||
| -rw-r--r-- | usage_test.go | 2 |
2 files changed, 2 insertions, 4 deletions
@@ -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 } diff --git a/usage_test.go b/usage_test.go index 24846ae..31b439b 100644 --- a/usage_test.go +++ b/usage_test.go @@ -301,7 +301,7 @@ Global options: p, err := NewParser(Config{}, &args) require.NoError(t, err) - err = p.Parse([]string{"child", "nested", "value"}) + _ = p.Parse([]string{"child", "nested", "value"}) var help bytes.Buffer p.WriteHelp(&help) |
