mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
19 lines
840 B
Go
19 lines
840 B
Go
|
package multitemplate
|
||
|
|
||
|
import "html/template"
|
||
|
import "github.com/gin-gonic/gin/render"
|
||
|
|
||
|
// Renderer type is the Agnostic Renderer for multitemplates.
|
||
|
// When gin is in debug mode then all multitemplates works with
|
||
|
// hot reloading allowing you modify file templates and seeing changes instantly.
|
||
|
// Renderer should be created using multitemplate.NewRenderer() constructor.
|
||
|
type Renderer interface {
|
||
|
render.HTMLRender
|
||
|
Add(name string, tmpl *template.Template)
|
||
|
AddFromFiles(name string, files ...string) *template.Template
|
||
|
AddFromGlob(name, glob string) *template.Template
|
||
|
AddFromString(name, templateString string) *template.Template
|
||
|
AddFromStringsFuncs(name string, funcMap template.FuncMap, templateStrings ...string) *template.Template
|
||
|
AddFromFilesFuncs(name string, funcMap template.FuncMap, files ...string) *template.Template
|
||
|
}
|