Renames NotFound404 to NotFound

This commit is contained in:
Manu Mtz-Almeida 2014-07-17 20:18:50 +02:00
parent 15c27c712d
commit d91cfbade4
2 changed files with 6 additions and 1 deletions

View File

@ -36,3 +36,8 @@ func (engine *Engine) ServeFiles(path string, root http.FileSystem) {
func (engine *Engine) LoadHTMLTemplates(pattern string) { func (engine *Engine) LoadHTMLTemplates(pattern string) {
engine.LoadHTMLGlob(pattern) engine.LoadHTMLGlob(pattern)
} }
// DEPRECATED. Use NotFound() instead
func (engine *Engine) NotFound404(handlers ...HandlerFunc) {
engine.NotFound(handlers...)
}

2
gin.go
View File

@ -79,7 +79,7 @@ func (engine *Engine) SetHTMLTemplate(templ *template.Template) {
} }
// Adds handlers for NotFound. It return a 404 code by default. // 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 engine.handlers404 = handlers
} }