update deps

This commit is contained in:
2025-01-21 06:33:01 +08:00
parent 19851da7f1
commit dcb28a8459
4 changed files with 166 additions and 68 deletions
+4 -5
View File
@@ -1,7 +1,6 @@
package mysql
import (
"github.com/joho/godotenv"
"github.com/suyiiyii/hertz101/app/user/conf"
"gorm.io/driver/mysql"
"gorm.io/gorm"
@@ -13,10 +12,10 @@ var (
)
func Init() {
err := godotenv.Load()
if err != nil {
panic(err)
}
// err := godotenv.Load()
// if err != nil {
// panic(err)
// }
//dsn := fmt.Sprintf(conf.GetConf().MySQL.DSN, os.Getenv("MYSQL_USER"), os.Getenv("MYSQL_PASSWORD"), os.Getenv("MYSQL_HOST"), os.Getenv("MYSQL_PORT"))
//DB, err = gorm.Open(mysql.Open(dsn),
DB, err = gorm.Open(mysql.Open(conf.GetConf().MySQL.DSN),