Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
var (
//go:embed template
templateDir embed.FS
// funcMap contains extra template functions used by ogent.
funcMap = template.FuncMap{
// FuncMap contains extra template functions used by ogent.
FuncMap = template.FuncMap{
"convertTo": convertTo,
"eagerLoad": eagerLoad,
"edgeOperations": entoas.EdgeOperations,
Expand All @@ -43,7 +43,7 @@ var (
"viewNameEdge": entoas.ViewNameEdge,
}
// templates holds all templates used by ogent.
templates = gen.MustParse(gen.NewTemplate("ogent").Funcs(funcMap).ParseFS(templateDir, "template/*tmpl"))
templates = gen.MustParse(gen.NewTemplate("ogent").Funcs(FuncMap).ParseFS(templateDir, "template/*tmpl"))
)

// eagerLoad returns the Go expression to eager load the required edges on the node operation.
Expand Down