Browse Source

Renames NotFound404 to NotFound

Manu Mtz-Almeida 11 years ago
parent
commit
d91cfbade4
2 changed files with 6 additions and 1 deletions
  1. 5 0
      deprecated.go
  2. 1 1
      gin.go

+ 5 - 0
deprecated.go

@@ -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...)
+}

+ 1 - 1
gin.go

@@ -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
 }
 }