Merge branch 'develop' into performance

Conflicts:
	binding/form_mapping.go
	context_test.go
This commit is contained in:
Manu Mtz-Almeida
2015-04-07 19:59:43 +02:00
14 changed files with 68 additions and 123 deletions

6
gin.go
View File

@ -115,8 +115,7 @@ func (engine *Engine) allocateContext() (context *Context) {
func (engine *Engine) LoadHTMLGlob(pattern string) {
if IsDebugging() {
r := &render.HTMLDebugRender{Glob: pattern}
engine.HTMLRender = r
engine.HTMLRender = &render.HTMLDebugRender{Glob: pattern}
} else {
templ := template.Must(template.ParseGlob(pattern))
engine.SetHTMLTemplate(templ)
@ -125,8 +124,7 @@ func (engine *Engine) LoadHTMLGlob(pattern string) {
func (engine *Engine) LoadHTMLFiles(files ...string) {
if IsDebugging() {
r := &render.HTMLDebugRender{Files: files}
engine.HTMLRender = r
engine.HTMLRender = &render.HTMLDebugRender{Files: files}
} else {
templ := template.Must(template.ParseFiles(files...))
engine.SetHTMLTemplate(templ)