Documentation ¶
Overview ¶
Copyright 2011 Viktor Kojouharov. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Package renderer provides a helper type for rendering html/template files. There is always a 'base' template, which acts as an initial template onto which functions may be registered and used in the subsequent template chain. Each template chain always ends with the 'base' template, and is cached after being parsed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RenderData ¶
type RenderData map[string]interface{}
type Renderer ¶
type Renderer interface { BaseName() string SetBaseName(string) Funcs(template.FuncMap) Delims(left, right string) SkipCache(skip ...bool) bool Render(w io.Writer, data RenderData, cdata context.ContextData, names ...string) error }
func NewRenderer ¶
NewRenderer creates a new renderer object. The path points to a directory containing the template files. The base is the name of the file for the 'base' template.