Documentation ¶
Index ¶
- type Engine
- func (e *Engine) AddFunc(name string, fn interface{}) *Engine
- func (e *Engine) AddFuncMap(m map[string]interface{}) *Engine
- func (e *Engine) Layout(key string) *Engine
- func (e *Engine) Load() error
- func (e *Engine) Reload(enabled bool) *Engine
- func (e *Engine) Render(w io.Writer, name string, data interface{}, layout ...string) error
- type Flash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { Flashes *Flash Templates *template.Template // contains filtered or unexported fields }
Engine defines the template engine
func NewFS ¶
func NewFS(fs http.FileSystem, ext string) *Engine
NewFS returns a template engine with a default configuration and given file system
func (*Engine) AddFunc ¶
AddFunc adds the function to the template's function map. It is legal to overwrite elements of the default actions
func (*Engine) AddFuncMap ¶
AddFuncMap adds the functions from a map to the template's function map. It is legal to overwrite elements of the default actions
Click to show internal directories.
Click to hide internal directories.