adsa-cms: github.com/mmanjoura/adsa-cms/render Index | Files

package render

import "github.com/mmanjoura/adsa-cms/render"

Index

Package Files

render.go template.go utils.go

type Render Uses

type Render struct {
    ViewPaths []string
    // contains filtered or unexported fields
}

Render render struct

func New Uses

func New(viewPaths ...string) *Render

New initalize render struct

func (*Render) Execute Uses

func (render *Render) Execute(name string, context interface{}, request *http.Request, writer http.ResponseWriter) error

Execute execute tmpl with application layout

func (*Render) Funcs Uses

func (render *Render) Funcs(funcMap template.FuncMap) *Template

Funcs set funcs for tmpl with application layout

func (*Render) Layout Uses

func (render *Render) Layout(name string) *Template

Layout set layout for tmpl

func (*Render) RegisterFuncMap Uses

func (render *Render) RegisterFuncMap(name string, fc interface{})

RegisterFuncMap register FuncMap for render

type Template Uses

type Template struct {
    // contains filtered or unexported fields
}

func (*Template) Execute Uses

func (tmpl *Template) Execute(name string, context interface{}, request *http.Request, writer http.ResponseWriter) (err error)

Execute execute tmpl

func (*Template) FuncMap Uses

func (tmpl *Template) FuncMap() template.FuncMap

FuncMap get func maps from tmpl

func (*Template) Funcs Uses

func (tmpl *Template) Funcs(funcMap template.FuncMap) *Template

Funcs register Funcs for tmpl

Package render imports 6 packages (graph) and is imported by 1 packages. Updated 2017-06-08. Refresh now. Tools for package owners.