Renames NotFound() to NoRoute()

This commit is contained in:
Manu Mtz-Almeida 2014-07-17 23:42:23 +02:00
parent d91cfbade4
commit 4731e82bb7
2 changed files with 3 additions and 3 deletions

View File

@ -39,5 +39,5 @@ func (engine *Engine) LoadHTMLTemplates(pattern string) {
// DEPRECATED. Use NotFound() instead // DEPRECATED. Use NotFound() instead
func (engine *Engine) NotFound404(handlers ...HandlerFunc) { func (engine *Engine) NotFound404(handlers ...HandlerFunc) {
engine.NotFound(handlers...) engine.NoRoute(handlers...)
} }

4
gin.go
View File

@ -78,8 +78,8 @@ func (engine *Engine) SetHTMLTemplate(templ *template.Template) {
} }
} }
// Adds handlers for NotFound. It return a 404 code by default. // Adds handlers for NoRoute. It return a 404 code by default.
func (engine *Engine) NotFound(handlers ...HandlerFunc) { func (engine *Engine) NoRoute(handlers ...HandlerFunc) {
engine.handlers404 = handlers engine.handlers404 = handlers
} }