template

package
v0.0.0-...-22a2038 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecTemplate

func ExecTemplate(tmpl *template.Template, data any) (string, error)

ExecTemplate executes a template with the given data

func NewTemplateOrPanic

func NewTemplateOrPanic(name string, path string) *template.Template

NewTemplateOrPanic creates a new template from the embed fs and panics if it fails

func Read

func Read(path string) (string, error)

Read reads the content of a file from the go embed fs

func ReadOrPanic

func ReadOrPanic(path string) string

ReadOrPanic reads the content of a file from the embed fs and panics if it fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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