Update pkglib to latest

This commit is contained in:
Tom Wiesing 2024-04-08 23:54:32 +02:00
parent 2d1f3e3819
commit 0c50b5e182
No known key found for this signature in database
10 changed files with 36 additions and 16 deletions

View file

@ -34,6 +34,11 @@ func (tpl *Template[C]) Template() *template.Template {
return baseTemplate
}
// LogTepmplateError logs a non-nil error into the logger found in the request
func (*Template[C]) LogTemplateError(r *http.Request, err error) {
handling.LogTemplateError(r, err)
}
// Context generates the context to pass to an instance of the template returned by Template.
func (tpl *Template[C]) Context(r *http.Request, c C, funcs ...FlagFunc) (ctx *tContext[C]) {
ctx = tpl.context(r, funcs...)