Documentation
¶
Overview ¶
Package templatereloader provides a jaws.TemplateLookuper that reparses templates from disk while running in debug or race builds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a jaws.TemplateLookuper.
If deadlock.Debug is false, it calls template.New("").ParseFS(fsys, fpath).
If deadlock.Debug is true, fsys is ignored and it returns a TemplateReloader that loads the templates using ParseGlob(relpath/fpath).
Types ¶
type TemplateReloader ¶
type TemplateReloader struct {
Path string // the file path we are loading from
// contains filtered or unexported fields
}
TemplateReloader reloads and reparses templates if more than one second has passed since the last TemplateReloader.Lookup.
Click to show internal directories.
Click to hide internal directories.