diff --git a/deprecated.go b/deprecated.go index e20e1f29..74fcd79a 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 07781977..36d51f35 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 }