liuchangshun 1 년 전
부모
커밋
1c29af53b3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lxDb/db.go

+ 1 - 1
lxDb/db.go

@@ -51,7 +51,7 @@ func InitDB(env string, conf DbConfig) {
 	if conf.Charset == "" {
 		conf.Charset = "utf8mb4"
 	}
-	dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=%s&parseTime=True&loc=Local",
+	dsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=%s&parseTime=True&loc=Local",
 		conf.User, conf.Password, conf.Host, conf.Port, conf.Database, conf.Charset)
 	if env == "dev" {
 		db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{