Fix lint warnings

This commit is contained in:
Dylan Allbee 2020-01-23 21:36:24 -08:00
parent 5df19ebe00
commit c24567c12e
2 changed files with 2 additions and 4 deletions

View File

@ -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
}

View File

@ -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)