Index | Files

package template

import ""

Package template is a thin wrapper over go's text/template and html/template packages. It allows you to use either of them with a single api. Text or HTML are inferred from the template name


Package Files


type FuncMap Uses

type FuncMap map[string]interface{}

type Template Uses

type Template struct {
    // contains filtered or unexported fields

func Must Uses

func Must(t *Template, err error) *Template

func New Uses

func New(name string) *Template

func (*Template) Execute Uses

func (t *Template) Execute(w io.Writer, ctx interface{}) error

func (*Template) Funcs Uses

func (t *Template) Funcs(fm FuncMap) *Template

func (*Template) New Uses

func (t *Template) New(name string) *Template

func (*Template) Parse Uses

func (t *Template) Parse(text string) (*Template, error)

Package template imports 6 packages (graph) and is imported by 4 packages. Updated 2017-10-11. Refresh now. Tools for package owners.