package errorx import "github.com/rs/zerolog/log" func PanicOnError(err error, msg string) { if err != nil { log.Panic().Err(err).Msg(msg) } }