Skip to content

Commit 4570c04

Browse files
barthrjirfag
authored andcommitted
remove panic for fmt.Fprintf (bit prettier when printing to console)
1 parent 13ce836 commit 4570c04

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/golangci-lint/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package main
22

33
import (
4+
"fmt"
5+
"os"
6+
47
"github.com/golangci/golangci-lint/pkg/commands"
58
)
69

@@ -13,7 +16,9 @@ var (
1316

1417
func main() {
1518
e := commands.NewExecutor(version, commit, date)
19+
1620
if err := e.Execute(); err != nil {
17-
panic(err)
21+
fmt.Fprintf(os.Stderr, "failed executing command with error %v\n", err)
22+
os.Exit(1)
1823
}
1924
}

0 commit comments

Comments
 (0)