psu/util/errors.go

13 lines
192 B
Go
Raw Normal View History

package util
2019-07-21 02:00:04 +00:00
import (
"github.com/sirupsen/logrus"
2019-07-21 02:00:04 +00:00
)
// CheckError checks if an error occurred (it's not nil)
func CheckError(err error) {
if err != nil {
logrus.Fatal(err.Error())
2019-07-21 02:00:04 +00:00
}
}