templatehelpers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package templatehelpers exposes optional convenience helpers for templates.

These helpers are useful in applications, but they are not required for go-partial's render tree, request handling, or connector behavior. Register them explicitly when an application wants them:

root.SetFunc(templatehelpers.FuncMap())

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionFuncMap

func CollectionFuncMap() template.FuncMap

CollectionFuncMap returns map and slice helper functions.

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns a fresh copy of the optional helper function map.

func HTMLFuncMap

func HTMLFuncMap() template.FuncMap

HTMLFuncMap returns helpers that mark HTML as trusted.

func NumberFuncMap

func NumberFuncMap() template.FuncMap

NumberFuncMap returns numeric helper functions.

func StringFuncMap

func StringFuncMap() template.FuncMap

StringFuncMap returns string and text helper functions.

func TimeFuncMap

func TimeFuncMap() template.FuncMap

TimeFuncMap returns time helper functions.

func URLFuncMap

func URLFuncMap() template.FuncMap

URLFuncMap returns URL helper functions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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