templater

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 6 Imported by: 0

README

Go-Templater

This package uses html/templater to render templates.

Installation

go get github.com/allenakinkunle/go-templater

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITemplater

type ITemplater interface {
	Render(wrt http.ResponseWriter, req *http.Request, templateName string, tmplData interface{})
}

type Templater

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

func NewTemplater

func NewTemplater(templateFS fs.FS, rootPath string, functions template.FuncMap) (*Templater, error)

func (*Templater) Render

func (t *Templater) Render(wrt http.ResponseWriter, req *http.Request, templateName string, tmplData interface{})

Jump to

Keyboard shortcuts

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