service/util.go

18 lines
223 B
Go
Raw Normal View History

2019-08-05 21:03:41 +00:00
package service
import (
"log"
"os"
)
func Check(err error, msg string, v ...interface{}) {
if err != nil {
Error(msg, v...)
}
}
func Error(msg string, v ...interface{}) {
log.Fatalf(msg+"\n", v...)
os.Exit(1)
}