update deps
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user