multitemplate

package
v0.0.0-...-e6aaabb Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Render

type Render map[string]*template.Template

Render type

func New

func New() Render

New instance

func (Render) Add

func (r Render) Add(name string, tmpl *template.Template)

Add new template

func (Render) AddFromFiles

func (r Render) AddFromFiles(name string, files ...string) *template.Template

AddFromFiles supply add template from files

func (Render) AddFromFilesFuncs

func (r Render) AddFromFilesFuncs(name string, funcMap template.FuncMap, files ...string) *template.Template

AddFromFilesFuncs supply add template from file callback func

func (Render) AddFromGlob

func (r Render) AddFromGlob(name, glob string) *template.Template

AddFromGlob supply add template from global path

func (*Render) AddFromString

func (r *Render) AddFromString(name, templateString string) *template.Template

AddFromString supply add template from strings

func (*Render) AddFromStringsFuncs

func (r *Render) AddFromStringsFuncs(name string, funcMap template.FuncMap, templateStrings ...string) *template.Template

AddFromStringsFuncs supply add template from strings

func (Render) Instance

func (r Render) Instance(name string, data interface{}) render.Render

Instance supply render string

Jump to

Keyboard shortcuts

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