gotpl

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gotpl provides a template renderer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncMap

type FuncMap = template.FuncMap

FuncMap is a map of functions that can be used in templates.

type Renderer

type Renderer interface {
	ToText(text string, original interface{}) ([]byte, error)
	ToJSON(text string, original interface{}) ([]byte, error)
}

Renderer is a template Renderer interface. It can render a template with the given text and original object.

func NewRenderer

func NewRenderer(funcMap FuncMap) Renderer

NewRenderer creates a new renderer.

Jump to

Keyboard shortcuts

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