From 0d0f96e109f6419d18f8f27b03b23a7dc8aace53 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Wed, 26 Jul 2023 13:44:49 +0800 Subject: [PATCH] chore: replace loop with tl = append(tl, m.tbls...) --- datasource/schemadb.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/datasource/schemadb.go b/datasource/schemadb.go index 4aa34968..36128d89 100644 --- a/datasource/schemadb.go +++ b/datasource/schemadb.go @@ -173,9 +173,7 @@ func (m *SchemaSource) Get(key driver.Value) (schema.Message, error) { func (m *SchemaDb) DropTable(t string) error { delete(m.tableMap, t) tl := make([]string, 0, len(m.tbls)) - for _, tn := range m.tbls { - tl = append(tl, tn) - } + tl = append(tl, m.tbls...) m.tbls = tl return nil }