16 lines
131 B
Go
16 lines
131 B
Go
|
package dao
|
||
|
|
||
|
import "gorm.io/gorm"
|
||
|
|
||
|
var (
|
||
|
db *gorm.DB
|
||
|
)
|
||
|
|
||
|
func SetDB(d *gorm.DB) {
|
||
|
db = d
|
||
|
}
|
||
|
|
||
|
func GetDB() *gorm.DB {
|
||
|
return db
|
||
|
}
|