swirl/biz/biz.go

16 lines
233 B
Go
Raw Normal View History

2017-09-26 12:50:09 +00:00
package biz
import (
"github.com/cuigh/auxo/errors"
"github.com/cuigh/swirl/dao"
)
func do(fn func(d dao.Interface)) {
d, err := dao.Get()
if err != nil {
2017-11-08 10:36:13 +00:00
panic(errors.Wrap(err, "failed to load storage engine"))
2017-09-26 12:50:09 +00:00
}
fn(d)
}