tmpl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tmpl provides helper functions for Go templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateFunc

func IterateFunc[T any](objs []T, f func(int, T) (string, error)) (string, error)

IterateFunc runs a function to generate a string over a slice of object. The result is all the strings joined by a new line.

func IterateTmpl

func IterateTmpl[T any](objs []T, tmpl *template.Template) (string, error)

IterateTmpl runs a template to generate a string over a slice of object. The result is all the strings joined by a new line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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