Skip to content

Commit

Permalink
Refactor: Rename template to generated_models.tmpl
Browse files Browse the repository at this point in the history
This template is used to generate generated_models.go. Let's name it based on
that.
  • Loading branch information
isimluk committed Sep 5, 2020
1 parent d473925 commit 9d26339
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion metaschema/template/pkged.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions metaschema/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func newTemplate(outputDir string) (*template.Template, error) {
return imports.String()
}

in, err := pkger.Open("/metaschema/template/types.tmpl")
in, err := pkger.Open("/metaschema/template/generated_models.tmpl")
if err != nil {
return nil, err
}
Expand All @@ -78,7 +78,7 @@ func newTemplate(outputDir string) (*template.Template, error) {
return nil, err
}

return template.New("types.tmpl").Funcs(template.FuncMap{
return template.New("generated_models.tmpl").Funcs(template.FuncMap{
"getImports": getImports,
}).Parse(string(tempText))
}

0 comments on commit 9d26339

Please sign in to comment.