Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is an object which loads, minifies and renders templates for CSS, JS, HTML, SVG, and XML.
func (*Renderer) ExecuteTemplate ¶
ExecuteTemplate executes the template with the specified name, passing it the provided data, and sending the output to the provided io.Writer.
func (*Renderer) ParseFiles ¶
ParseFiles loads, minifies and parses all template files under the supplied base path. Each template is named according to its relative path under the base path. HTML files are parsed into html/template templates, other files are parsed into text/template templates.
func (*Renderer) Reload ¶
Reload causes the Renderer to rescan all of the directories it has been told to scan before, and reload all of the template files.
This method is intended for use during development. It should not be used in production, as the cached template update process is unsafe and template execution in other goroutines may fail while the files are being reloaded.