Skip to content

Commit

Permalink
Avoid to check error type directly
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Jul 23, 2020
1 parent 3c2537c commit e7d4563
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"errors"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -47,7 +48,7 @@ func main() {
flagSet.StringVarP(&c.executable, "executable", "e", "", "absolute path to the golangci-lint executable")
flagSet.Usage = usage
if err := flagSet.Parse(os.Args[1:]); err != nil {
if err != flag.ErrHelp {
if !errors.Is(err, flag.ErrHelp) {
fmt.Fprintln(c.stderr, err)
}
return
Expand Down

0 comments on commit e7d4563

Please sign in to comment.