Fixed bug with funcmap in prod mode
This commit is contained in:
parent
6c3310b83d
commit
1b888a3513
2
main.go
2
main.go
@ -264,7 +264,7 @@ func getPage(layout, page string) (tmpl *template.Template, err error) { // {{{
|
|||||||
if flagDev {
|
if flagDev {
|
||||||
tmpl, err = template.New("main.gotmpl").Funcs(funcMap).ParseFS(os.DirFS("."), filenames...)
|
tmpl, err = template.New("main.gotmpl").Funcs(funcMap).ParseFS(os.DirFS("."), filenames...)
|
||||||
} else {
|
} else {
|
||||||
tmpl, err = template.New("main.gotmpl").ParseFS(viewFS, filenames...)
|
tmpl, err = template.New("main.gotmpl").Funcs(funcMap).ParseFS(viewFS, filenames...)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = we.Wrap(err).Log()
|
err = we.Wrap(err).Log()
|
||||||
|
Loading…
Reference in New Issue
Block a user