Skip to content

Commit

Permalink
cosmetic: simplify Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-m committed Jul 8, 2021
1 parent 32dc17a commit 1a68f58
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,7 @@ func (p *Parser) SetHelpTemplate(tmpl string) error {

// Parse calculates all flags and subcommands
func (p *Parser) Parse() error {

err := p.ParseArgs(os.Args[1:])
if err != nil {
return err
}
return nil

return p.ParseArgs(os.Args[1:])
}

// ShowHelp shows Help without an error message
Expand Down

0 comments on commit 1a68f58

Please sign in to comment.