mirror of
https://github.com/MedzikUser/go-pingbot
synced 2024-08-14 23:57:07 +00:00
14 lines
208 B
Go
14 lines
208 B
Go
|
package common
|
||
|
|
||
|
import "github.com/sirupsen/logrus"
|
||
|
|
||
|
func CheckErr(err error, trace string) bool {
|
||
|
if err != nil {
|
||
|
Log.WithFields(logrus.Fields{
|
||
|
"trace": trace,
|
||
|
}).Error(err)
|
||
|
}
|
||
|
|
||
|
return err != nil
|
||
|
}
|