mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-19 12:20:24 +08:00
优化代码
This commit is contained in:
@@ -70,7 +70,7 @@ func (this *SQLDump) Dump(db *dbs.DB) (result *SQLDumpResult, err error) {
|
||||
Name: table.Name,
|
||||
Engine: table.Engine,
|
||||
Charset: table.Collation,
|
||||
Definition: regexp.MustCompile(" AUTO_INCREMENT=\\d+").ReplaceAllString(table.Code, ""),
|
||||
Definition: regexp.MustCompile(` AUTO_INCREMENT=\d+`).ReplaceAllString(table.Code, ""),
|
||||
}
|
||||
|
||||
// 字段
|
||||
|
||||
@@ -8,7 +8,7 @@ type SQLDumpResult struct {
|
||||
|
||||
func (this *SQLDumpResult) FindTable(tableName string) *SQLTable {
|
||||
for _, table := range this.Tables {
|
||||
if strings.ToLower(table.Name) == strings.ToLower(tableName) {
|
||||
if strings.EqualFold(table.Name, tableName) {
|
||||
return table
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user