Skip to content

Commit a33bdba

Browse files
committed
update generator
1 parent 6252610 commit a33bdba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

generator.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ type Generator struct {
1414
}
1515

1616
type data struct {
17-
PackageName string
18-
CachePlanRaw string
17+
PackageName string
18+
CachePlanRaw string
19+
TableSchemaRaw string
1920
}
2021

21-
func NewGenerator(cachePlanRaw string) *Generator {
22+
func NewGenerator(cachePlanRaw string, tableSchemaRaw string) *Generator {
2223
return &Generator{
2324
driverTmpl: template.Must(template.ParseFiles("template/driver.tmpl")),
2425
stmtTmpl: template.Must(template.ParseFiles("template/stmt.tmpl")),
25-
data: data{CachePlanRaw: escapeGoString(cachePlanRaw)},
26+
data: data{CachePlanRaw: escapeGoString(cachePlanRaw), TableSchemaRaw: escapeGoString(tableSchemaRaw)},
2627
}
2728
}
2829

0 commit comments

Comments
 (0)