mirror of
https://github.com/cuigh/swirl
synced 2025-01-03 17:42:29 +00:00
16 lines
233 B
Go
16 lines
233 B
Go
|
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 {
|
||
|
panic(errors.Wrap("failed to load storage engine", err))
|
||
|
}
|
||
|
|
||
|
fn(d)
|
||
|
}
|