mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-20 17:06:24 +08:00
Renames NotFound() to NoRoute()
This commit is contained in:
4
gin.go
4
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user