templatez

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteGo added in v1.2.0

func ExecuteGo(template *texttemplate.Template, data interface{}) ([]byte, error)

ExecuteGo executes a text template, formatting the result as Go code.

func ExecuteHTML added in v1.2.0

func ExecuteHTML(template *htmltemplate.Template, data interface{}) ([]byte, error)

ExecuteHTML executes a HTML template.

func ExecuteHTMLTidy added in v1.2.0

func ExecuteHTMLTidy(template *htmltemplate.Template, data interface{}) ([]byte, error)

ExecuteHTMLTidy executes a HTML template, formatting the result as HTML code.

func ExecuteJSON added in v1.2.0

func ExecuteJSON(template *texttemplate.Template, prefix, indent string, data interface{}) ([]byte, error)

ExecuteJSON executes a text template, formatting the result as JSON code.

func ExecuteText added in v1.2.0

func ExecuteText(template *texttemplate.Template, data interface{}) ([]byte, error)

ExecuteText executes a text template.

func MustExecuteGo added in v1.2.0

func MustExecuteGo(template *texttemplate.Template, data interface{}) []byte

MustExecuteGo is like ExecuteGo but panics on error.

func MustExecuteHTML

func MustExecuteHTML(template *htmltemplate.Template, data interface{}) []byte

MustExecuteHTML is like ExecuteHTML but panics on error.

func MustExecuteHTMLTidy added in v1.2.0

func MustExecuteHTMLTidy(template *htmltemplate.Template, data interface{}) []byte

MustExecuteHTMLTidy is like ExecuteHTMLTidy but panics on error.

func MustExecuteJSON added in v1.2.0

func MustExecuteJSON(template *texttemplate.Template, prefix, indent string, data interface{}) []byte

MustExecuteJSON executes a text template, formatting the result as JSON code, panics on error.

func MustExecuteText

func MustExecuteText(template *texttemplate.Template, data interface{}) []byte

MustExecuteText is like ExecuteText but panics on error.

func MustParseAndExecuteGo added in v1.2.0

func MustParseAndExecuteGo(template string, data interface{}) []byte

MustParseAndExecuteGo is like ParseAndExecuteGo but panics on error.

func MustParseAndExecuteHTML

func MustParseAndExecuteHTML(template string, data interface{}) []byte

MustParseAndExecuteHTML is like ParseAndExecuteHTML but panics on error.

func MustParseAndExecuteHTMLTidy added in v1.2.0

func MustParseAndExecuteHTMLTidy(template string, data interface{}) []byte

MustParseAndExecuteHTMLTidy is like ParseAndExecuteHTMLTidy but panics on error.

func MustParseAndExecuteJSON added in v1.2.0

func MustParseAndExecuteJSON(template, prefix, indent string, data interface{}) []byte

MustParseAndExecuteJSON is like ParseAndExecuteJSON but panics on error.

func MustParseAndExecuteText

func MustParseAndExecuteText(template string, data interface{}) []byte

MustParseAndExecuteText is like ParseAndExecuteText but panics on error.

func ParseAndExecuteGo added in v1.2.0

func ParseAndExecuteGo(template string, data interface{}) ([]byte, error)

ParseAndExecuteGo parses and executes a text template, formatting the result as Go code.

func ParseAndExecuteHTML

func ParseAndExecuteHTML(template string, data interface{}) ([]byte, error)

ParseAndExecuteHTML parses and executes a HTML template.

func ParseAndExecuteHTMLTidy added in v1.2.0

func ParseAndExecuteHTMLTidy(template string, data interface{}) ([]byte, error)

ParseAndExecuteHTMLTidy parses and executes a HTML template, formatting the result as HTML code.

func ParseAndExecuteJSON added in v1.2.0

func ParseAndExecuteJSON(template, prefix, indent string, data interface{}) ([]byte, error)

ParseAndExecuteJSON parses and executes a text template, formatting the result as JSON code.

func ParseAndExecuteText

func ParseAndExecuteText(template string, data interface{}) ([]byte, error)

ParseAndExecuteText parses and executes a text template.

Types

This section is empty.

Jump to

Keyboard shortcuts

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