Documentation ¶
Overview ¶
tmplstorage implements filesystem templates storage with caching features
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TemplateStorage ¶
type TemplateStorage struct {
// contains filtered or unexported fields
}
TemplateStorage load, caching and return the templates by their id
func New ¶
func New(path string) *TemplateStorage
New create the instance of TemplateStorage with path pointed to fs root directory where templates are located
func (*TemplateStorage) Template ¶
func (t *TemplateStorage) Template(id string) (*template.Template, error)
Template return the template.Template instance for template id or error. Id is a path relative to the storage's root. If id doesn't end with '.tmpl' suffix, it will be added If id is empty, "default.tmpl" will be used
Click to show internal directories.
Click to hide internal directories.