html

package
v3.0.0-beta+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Config    *config.Template
	Templates *template.Template
	// Middleware
	// Note:
	// I see that many template engines returns html/template as result
	// so I decided that the HTMLTemplate should accept a middleware for the final string content will be parsed to the main *html/template.Template
	// for example user of this property is Jade, currently
	Middleware func(string, string) (string, error)
}

func New

func New(c config.Template) *Engine

New creates and returns the HTMLTemplate template engine

func (*Engine) BuildTemplates

func (s *Engine) BuildTemplates() error

func (*Engine) ExecuteWriter

func (s *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, layout string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL