template

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstParagraphFromHtml

func FirstParagraphFromHtml(htmlContent template.HTML) template.HTML

func FirstParagraphFromString

func FirstParagraphFromString(content string) string

Types

type Engine

type Engine struct {
	Templates map[string]*template.Template
	// contains filtered or unexported fields
}

func New

func New(funcMap template.FuncMap) *Engine

func (*Engine) LoadTemplates

func (e *Engine) LoadTemplates(templateDir string) error

func (*Engine) RenderTemplate

func (e *Engine) RenderTemplate(name string, result io.Writer, data interface{}) error

func (*Engine) TemplateExists

func (e *Engine) TemplateExists(name string) bool

Jump to

Keyboard shortcuts

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