1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

bug fix: need to add custom funcs when using assets

This commit is contained in:
Zack Scholl 2018-04-19 20:59:14 -07:00
parent 8bc1123f1d
commit 91178f4f29
2 changed files with 52 additions and 50 deletions

File diff suppressed because one or more lines are too long

View File

@ -165,7 +165,9 @@ func loadTemplates(list ...string) multitemplate.Render {
panic(err)
}
tmplMessage, err := template.New(x).Parse(string(templateString))
tmplMessage, err := template.New(x).Funcs(template.FuncMap{
"sniffContentType": sniffContentType,
}).Parse(string(templateString))
if err != nil {
panic(err)
}