templatez

package
v0.48.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package templatez contains utilities for working with Go templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTemplate

func ExecuteTemplate(name, tpl string, data any) (string, error)

ExecuteTemplate is a convenience function that constructs and executes a text template, returning the string value.

func NewTemplate

func NewTemplate(name, tpl string) (*template.Template, error)

NewTemplate returns a new text template, with the sprig functions already loaded.

func ValidTemplate

func ValidTemplate(name, tpl string) error

ValidTemplate is a convenience wrapper around NewTemplate. It returns an error if the tpl is not a valid 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