Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Templater ¶
type Templater struct {
// contains filtered or unexported fields
}
Templater struct to hold the loaded templates.
func NewTemplater ¶
NewTemplater returns a Templater with parsed templates in the directory TMPLPATH.
func (*Templater) Render ¶
func (t *Templater) Render(w http.ResponseWriter, name string, data interface{})
Render will render the template of the given name, with the given data, to the given response writer. Will render an error message to the http.ResponseWriter if template is not found. Setting LOADTMPLONREQUEST to true in the environment variables will cause templates to be reloaded on all template renders.
func (*Templater) RenderBuffer ¶
RenderBuffer renders the template of the given name, with the given data, to the given byte buffer
Click to show internal directories.
Click to hide internal directories.