7 Star 1 Fork 1

罗中天/douyin

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
init.go 328 Bytes
Copy Edit Raw Blame History
luozhongtian02 authored 2023-01-29 16:36 +08:00 . fix: 修改项目module名称
package db
import (
"gitee.com/derrickball/douyin/pkg/config"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
var DB *gorm.DB
func Init() {
var err error
DB, err = gorm.Open(mysql.Open(config.Config.MySQL.DSN), &gorm.Config{
SkipDefaultTransaction: true,
PrepareStmt: true,
})
if err != nil {
panic(err)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/derrickball/douyin.git
git@gitee.com:derrickball/douyin.git
derrickball
douyin
douyin
48d44dfe16fa

Search