Documentation ¶
Index ¶
- Constants
- type Config
- type Engine
- func (s *Engine) ExecuteRaw(src string, wr io.Writer, binding interface{}) (err error)
- func (s *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, ...) error
- func (s *Engine) Funcs() map[string]interface{}
- func (s *Engine) LoadAssets(virtualDirectory string, virtualExtension string, ...) error
- func (s *Engine) LoadDirectory(dir string, extension string) error
Constants ¶
View Source
const (
// NoLayout to disable layout for a particular template file
NoLayout = "@.|.@no_layout@.|.@"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Left string Right string Layout string Funcs map[string]interface{} LayoutFuncs map[string]interface{} }
Config for html template engine
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configs for the html template engine
type Engine ¶
type Engine struct { Config Config Middleware func(name string, contents string) (string, error) Templates *template.Template // contains filtered or unexported fields }
Engine the html/template engine
func (*Engine) ExecuteRaw ¶
ExecuteRaw receives, parse and executes raw source template contents it's super-simple function without options and funcs, it's not used widely implements the EngineRawExecutor interface
func (*Engine) ExecuteWriter ¶
func (s *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, options ...map[string]interface{}) error
ExecuteWriter executes a templates and write its results to the out writer
Click to show internal directories.
Click to hide internal directories.