template

package
v0.0.0-...-9b5cd94 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVar = "Env"

Variables

View Source
var ErrDivisionByZero = errors.New("division by zero")
View Source
var ErrFailedConvertToInt64 = errors.New("failed convert to int64")

Functions

func GetFunctions

func GetFunctions(appLocation *time.Location) template.FuncMap

Types

type Executor

type Executor interface {
	Execute(tplStr string, data any) (string, error)
	Parse(text string) ParsedTemplate
	ExecuteByTpl(tpl *template.Template, data any) (string, error)
}

func NewExecutor

func NewExecutor(
	templateConfigProvider config.TemplateConfigProvider,
	timezoneConfigProvider config.TimezoneConfigProvider,
) Executor

type ParsedTemplate

type ParsedTemplate struct {
	Text string
	Tpl  *template.Template
	Err  error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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