mirror of https://github.com/gin-gonic/gin.git
SetHTTPTemplate -> SetHTMLTemplate
This commit is contained in:
parent
3cf2d1338f
commit
176edde1fb
6
gin.go
6
gin.go
|
@ -149,15 +149,15 @@ func Default() *Engine {
|
||||||
|
|
||||||
func (engine *Engine) LoadHTMLGlob(pattern string) {
|
func (engine *Engine) LoadHTMLGlob(pattern string) {
|
||||||
templ := template.Must(template.ParseGlob(pattern))
|
templ := template.Must(template.ParseGlob(pattern))
|
||||||
engine.SetHTTPTemplate(templ)
|
engine.SetHTMLTemplate(templ)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (engine *Engine) LoadHTMLFiles(files ...string) {
|
func (engine *Engine) LoadHTMLFiles(files ...string) {
|
||||||
templ := template.Must(template.ParseFiles(files...))
|
templ := template.Must(template.ParseFiles(files...))
|
||||||
engine.SetHTTPTemplate(templ)
|
engine.SetHTMLTemplate(templ)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (engine *Engine) SetHTTPTemplate(templ *template.Template) {
|
func (engine *Engine) SetHTMLTemplate(templ *template.Template) {
|
||||||
engine.HTMLRender = render.HTMLRender{
|
engine.HTMLRender = render.HTMLRender{
|
||||||
Template: templ,
|
Template: templ,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue