tmpl

package
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

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

Template -

func New

func New(root *template.Template, ctx interface{}) *Template

New -

func (*Template) Exec

func (t *Template) Exec(name string, context ...interface{}) (string, error)

Exec - execute (render) a template - this is the built-in `template` action, except with output...

func (*Template) Inline

func (t *Template) Inline(args ...interface{}) (string, error)

Inline - a template function to do inline template processing

Can be called 4 ways: {{ tmpl.Inline "inline template" }} - unnamed (single-use) template with default context {{ tmpl.Inline "name" "inline template" }} - named template with default context {{ tmpl.Inline "inline template" $foo }} - unnamed (single-use) template with given context {{ tmpl.Inline "name" "inline template" $foo }} - named template with given context

Jump to

Keyboard shortcuts

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