Template debugging

This commit is contained in:
Manu Mtz-Almeida
2015-08-03 17:28:12 +02:00
parent fd5d4294a5
commit 2b3aa51738
2 changed files with 18 additions and 1 deletions

1
gin.go
View File

@ -123,6 +123,7 @@ func (engine *Engine) allocateContext() *Context {
func (engine *Engine) LoadHTMLGlob(pattern string) {
if IsDebugging() {
debugPrintLoadTemplate(template.Must(template.ParseGlob(pattern)))
engine.HTMLRender = render.HTMLDebug{Glob: pattern}
} else {
templ := template.Must(template.ParseGlob(pattern))