Fix lint warnings
This commit is contained in:
parent
5df19ebe00
commit
c24567c12e
4
usage.go
4
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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue