mirror of
https://github.com/MedzikUser/go-cdn
synced 2024-08-15 03:19:36 +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
|
||
|
}
|