Skip to content

Commit df93f5b

Browse files
committed
bonsai
1 parent e7ff859 commit df93f5b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ddl/ddl.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ func ParseReferencedTables(src string) []string {
5454
return start, nil, nil
5555
})
5656

57-
tables := []string{}
58-
with := []string{}
57+
var tables []string
58+
var with []string
5959
tFrom := false
6060
tJoin := false
6161
tWith := false
@@ -74,21 +74,21 @@ func ParseReferencedTables(src string) []string {
7474
tWith = false
7575
default:
7676
if tFrom {
77-
tables = append(tables, strings.Replace(token, "`", "", -1))
77+
tables = append(tables, strings.ReplaceAll(token, "`", ""))
7878
}
7979
if tJoin {
80-
tables = append(tables, strings.Replace(token, "`", "", -1))
80+
tables = append(tables, strings.ReplaceAll(token, "`", ""))
8181
}
8282
if tWith {
83-
with = append(with, strings.Replace(token, "`", "", -1))
83+
with = append(with, strings.ReplaceAll(token, "`", ""))
8484
}
8585
tFrom = false
8686
tJoin = false
8787
tWith = false
8888
}
8989
}
9090

91-
result := []string{}
91+
var result []string
9292
for _, t := range tables {
9393
if lo.Contains(with, t) {
9494
continue

0 commit comments

Comments
 (0)