tplz

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package tplz provides various utilities for working with the Go templating engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteGo

func ExecuteGo(template *ttpl.Template, data any) ([]byte, error)

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

func ExecuteHTML

func ExecuteHTML(template *htpl.Template, data any) ([]byte, error)

ExecuteHTML executes a HTML template.

func ExecuteJSON

func ExecuteJSON(template *ttpl.Template, prefix, indent string, data any) ([]byte, error)

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

func ExecuteText

func ExecuteText(template *ttpl.Template, data any) ([]byte, error)

ExecuteText executes a text template.

func MustExecuteGo

func MustExecuteGo(template *ttpl.Template, data any) []byte

MustExecuteGo is like ExecuteGo but panics on error.

func MustExecuteHTML

func MustExecuteHTML(template *htpl.Template, data any) []byte

MustExecuteHTML is like ExecuteHTML but panics on error.

func MustExecuteJSON

func MustExecuteJSON(template *ttpl.Template, prefix, indent string, data any) []byte

MustExecuteJSON is like ExecuteJSON but panics on error.

func MustExecuteText

func MustExecuteText(template *ttpl.Template, data any) []byte

MustExecuteText is like ExecuteText but panics on error.

func MustParseAndExecuteGo

func MustParseAndExecuteGo(template string, data any) []byte

MustParseAndExecuteGo is like ParseAndExecuteGo but panics on error.

func MustParseAndExecuteHTML

func MustParseAndExecuteHTML(template string, data any) []byte

MustParseAndExecuteHTML is like ParseAndExecuteHTML but panics on error.

func MustParseAndExecuteJSON

func MustParseAndExecuteJSON(template, prefix, indent string, data any) []byte

MustParseAndExecuteJSON is like ParseAndExecuteJSON but panics on error.

func MustParseAndExecuteText

func MustParseAndExecuteText(template string, data any) []byte

MustParseAndExecuteText is like ParseAndExecuteText but panics on error.

func ParseAndExecuteGo

func ParseAndExecuteGo(template string, data any) ([]byte, error)

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

func ParseAndExecuteHTML

func ParseAndExecuteHTML(template string, data any) ([]byte, error)

ParseAndExecuteHTML parses and executes a HTML template.

func ParseAndExecuteJSON

func ParseAndExecuteJSON(template, prefix, indent string, data any) ([]byte, error)

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

func ParseAndExecuteText

func ParseAndExecuteText(template string, data any) ([]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