Explorar o código

Renames NotFound404 to NotFound

Manu Mtz-Almeida %!s(int64=11) %!d(string=hai) anos
pai
achega
d91cfbade4
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  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) {
 	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.
-func (engine *Engine) NotFound404(handlers ...HandlerFunc) {
+func (engine *Engine) NotFound(handlers ...HandlerFunc) {
 	engine.handlers404 = handlers
 }