From 4731e82bb7408d6255cfe0a682d4b291962a866d Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Thu, 17 Jul 2014 23:42:23 +0200 Subject: [PATCH] Renames NotFound() to NoRoute() --- deprecated.go | 2 +- gin.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deprecated.go b/deprecated.go index 74fcd79..91d0823 100644 --- a/deprecated.go +++ b/deprecated.go @@ -39,5 +39,5 @@ func (engine *Engine) LoadHTMLTemplates(pattern string) { // DEPRECATED. Use NotFound() instead func (engine *Engine) NotFound404(handlers ...HandlerFunc) { - engine.NotFound(handlers...) + engine.NoRoute(handlers...) } diff --git a/gin.go b/gin.go index 36d51f3..111e81d 100644 --- a/gin.go +++ b/gin.go @@ -78,8 +78,8 @@ func (engine *Engine) SetHTMLTemplate(templ *template.Template) { } } -// Adds handlers for NotFound. It return a 404 code by default. -func (engine *Engine) NotFound(handlers ...HandlerFunc) { +// Adds handlers for NoRoute. It return a 404 code by default. +func (engine *Engine) NoRoute(handlers ...HandlerFunc) { engine.handlers404 = handlers }