watchyourlan/internal/check/error.go
2022-12-26 23:30:49 +07:00

15 lines
186 B
Go

package check
import (
"log"
)
// IfError prints error, if it is not nil
func IfError(err error) bool {
if err == nil {
return false
}
log.Println("ERROR:", err)
return true
}