diff --git a/views/template.go b/views/template.go
index 40c4fc5..211e9f2 100644
--- a/views/template.go
+++ b/views/template.go
@@ -42,6 +42,11 @@ func (t Template) TestTemplate(data interface{}) error {
if err != nil {
return err
}
+ tpl = tpl.Funcs(template.FuncMap{
+ "csrfField": func() template.HTML {
+ return `
STUB: PLACEHOLDER
`
+ },
+ })
return tpl.Execute(&testWriter, data)
}
@@ -52,8 +57,8 @@ func FromFile(pattern ...string) (Template, error) {
func FromFS(fs fs.FS, pattern ...string) (Template, error) {
tpl := template.New(pattern[0])
tpl = tpl.Funcs(template.FuncMap{
- "csrfField": func() template.HTML {
- return `STUB: PLACEHOLDER
`
+ "csrfField": func() (template.HTML, error) {
+ return `STUB: PLACEHOLDER
`, fmt.Errorf("csrfField Not Implimented")
},
})
tpl, err := tpl.ParseFS(fs, pattern...)