wip
This commit is contained in:
@@ -8,16 +8,16 @@ import (
|
||||
"text/template"
|
||||
)
|
||||
|
||||
//go:embed sqlite.go.tmpl
|
||||
var sqliteTemplate string
|
||||
//go:embed gen.go.tmpl
|
||||
var fileTemplate string
|
||||
|
||||
func render(templateStr, schemaPath, outputPath string) error {
|
||||
sch, err := parsePath(schemaPath)
|
||||
func render(driver, schemaPath, outputPath string) error {
|
||||
sch, err := parsePath(driver, schemaPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tmpl := template.Must(template.New("").Parse(templateStr))
|
||||
tmpl := template.Must(template.New("").Parse(fileTemplate))
|
||||
fOut, err := os.Create(outputPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user