You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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 |
|
}
|
|
|