Add custom pagination template
This commit is contained in:
@@ -9,7 +9,16 @@ import (
|
||||
|
||||
func main() {
|
||||
log.Println("ersteller start")
|
||||
must(entc.Generate("./schema/ent/example/ent/schema", &gen.Config{}))
|
||||
// Parse our custom pagination template (per-entity Query methods).
|
||||
paginationPath := "schema/ent/pagination_query.tmpl"
|
||||
//paginationTmpl := gen.MustParse(gen.NewTemplate("pagination_query").
|
||||
// ParseFiles(paginationPath))
|
||||
|
||||
must(entc.Generate(
|
||||
"./schema/ent/example/ent/schema",
|
||||
&gen.Config{},
|
||||
entc.TemplateFiles(paginationPath),
|
||||
))
|
||||
}
|
||||
|
||||
func must(err error) {
|
||||
|
||||
Reference in New Issue
Block a user