Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Template = tmplutil.Templater{ FileSystem: baseFS, Includes: map[string]string{ "styles": "components/styles.html", "error": "components/error.html", }, Functions: template.FuncMap{ "Plural": Plural, "ToLower": strings.ToLower, "ToUpper": strings.ToUpper, }, OnRenderFail: func(sub *tmplutil.Subtemplate, w io.Writer, err error) { Template := sub.Templater() Template.Subtemplate("error").Execute(w, err) }, }
Functions ¶
func ErrorHTML ¶
func ErrorHTML(w http.ResponseWriter, code int, err error)
ErrorHTML writes the error as HTML into w.
func OverrideTmpl ¶
func OverrideTmpl(path string)
OverrideTmpl overrides templates using the given path.
func StaticHandler ¶
StaticHandler returns a handler serving files in static/.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.