go-common/app/infra/canal/dao/dao.go
2019-04-22 18:49:16 +08:00

24 lines
281 B
Go

package dao
import (
"go-common/app/infra/canal/conf"
"go-common/library/database/sql"
)
// Dao dao
type Dao struct {
// config
c *conf.Config
// db
db *sql.DB
}
// New dao new
func New(c *conf.Config) (d *Dao) {
d = &Dao{
c: c,
db: sql.NewMySQL(c.DB),
}
return
}