From d91cfbade48628a812e3e42a26a66424b369754b Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Thu, 17 Jul 2014 20:18:50 +0200 Subject: [PATCH] Renames NotFound404 to NotFound --- deprecated.go | 5 +++++ gin.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deprecated.go b/deprecated.go index e20e1f2..74fcd79 100644 --- a/deprecated.go +++ b/deprecated.go @@ -36,3 +36,8 @@ func (engine *Engine) ServeFiles(path string, root http.FileSystem) { func (engine *Engine) LoadHTMLTemplates(pattern string) { engine.LoadHTMLGlob(pattern) } + +// DEPRECATED. Use NotFound() instead +func (engine *Engine) NotFound404(handlers ...HandlerFunc) { + engine.NotFound(handlers...) +} diff --git a/gin.go b/gin.go index 0778197..36d51f3 100644 --- a/gin.go +++ b/gin.go @@ -79,7 +79,7 @@ func (engine *Engine) SetHTMLTemplate(templ *template.Template) { } // Adds handlers for NotFound. It return a 404 code by default. -func (engine *Engine) NotFound404(handlers ...HandlerFunc) { +func (engine *Engine) NotFound(handlers ...HandlerFunc) { engine.handlers404 = handlers }