templater

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

README

templater

The templater project is used to create a *template.Templater from html/template from either an embedded directory or a directory from the operating system.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskTemplater

type DiskTemplater struct {
	// contains filtered or unexported fields
}

func (*DiskTemplater) Tmpl

func (d *DiskTemplater) Tmpl() *template.Template

type EmbeddedTemplater

type EmbeddedTemplater struct {
	// contains filtered or unexported fields
}

func (EmbeddedTemplater) Tmpl

type Templater

type Templater interface {
	Tmpl() *template.Template
}

func NewDiskTemplater

func NewDiskTemplater(dir string, funcMap template.FuncMap, pattern, rootTemplateName string) Templater

func NewEmbeddedTemplater

func NewEmbeddedTemplater(dir string, embedded embed.FS, funcMap template.FuncMap, pattern, rootTemplateName string) (Templater, error)

Jump to

Keyboard shortcuts

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