Documentation ¶
Overview ¶
Package ssr provides utilities for server-side rendering of HTML pages which are sent to the client in response to HTTP requests.
Index ¶
Constants ¶
View Source
const TemplateExt = ".tmpl.html"
TemplateExt is the file extension used for templates.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateSet ¶
type TemplateSet struct {
// contains filtered or unexported fields
}
TemplateSet is a set of templates that can be rendered by the server.
func NewTemplateSet ¶
NewTemplateSet creates a new template set from an FS, a given file prefix. Caller may optionally configure the template set with a base template, i.e. a template that is used as the base for all other templates.
func (*TemplateSet) Exec ¶
Exec executes the template with the given ID and data, writing the output to w.
func (*TemplateSet) Has ¶
func (ts *TemplateSet) Has(id string) bool
Has returns true if the template with the given ID exists in the set.
Click to show internal directories.
Click to hide internal directories.