1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/vendor/github.com/gin-contrib/multitemplate/renderer.go
2018-04-22 05:51:19 -06:00

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
}