perf👌: Optimize go warnings

This commit is contained in:
wenjianzhang
2023-08-01 22:38:41 +08:00
parent 69df1b3d34
commit 37a5963cd6
41 changed files with 83 additions and 87 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ func ExecSql(db *gorm.DB, filePath string) error {
fmt.Println(sqlList[i])
continue
}
sql := strings.Replace(sqlList[i]+";", "\n", "", 0)
sql := strings.Replace(sqlList[i]+";", "\n", "", -1)
sql = strings.TrimSpace(sql)
if err = db.Exec(sql).Error; err != nil {
log.Printf("error sql: %s", sql)