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 }