Skip to content

Commit

Permalink
add(helpers): #14 - fatal error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-delaloy committed Oct 13, 2021
1 parent 588aecb commit f8205da
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/helpers/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package helpers

import "github.com/sirupsen/logrus"

func ExitOnError(msg string, err error) {
if err != nil {
logrus.Fatal(msg, err)
}
}

0 comments on commit f8205da

Please sign in to comment.