Documentation ¶
Overview ¶
Package templatewatcher provides ways to automatically reparse templates files whenever a change is detected
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateWatcher ¶
type TemplateWatcher struct {
// contains filtered or unexported fields
}
TemplateWatcher is used to automatically reparse teplate files whenever a change is detected
func NewTemplateWatcher ¶
func NewTemplateWatcher(name string, folders []string) *TemplateWatcher
NewTemplateWatcher creates a new TemplateWatcher watching all the files which name ends with ".html" inside the provided folders. Subfolders are not going to be watched
func (*TemplateWatcher) GetTemplate ¶
func (tw *TemplateWatcher) GetTemplate() *template.Template
GetTemplate returns a reference to the watched template
func (*TemplateWatcher) Reload ¶
func (tw *TemplateWatcher) Reload()
Reload reloads all template files
Click to show internal directories.
Click to hide internal directories.