mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-11-04 09:12:12 +08:00 
			
		
		
		
	Renames NotFound() to NoRoute()
This commit is contained in:
		
							parent
							
								
									d91cfbade4
								
							
						
					
					
						commit
						4731e82bb7
					
				@ -39,5 +39,5 @@ func (engine *Engine) LoadHTMLTemplates(pattern string) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// DEPRECATED. Use NotFound() instead
 | 
					// DEPRECATED. Use NotFound() instead
 | 
				
			||||||
func (engine *Engine) NotFound404(handlers ...HandlerFunc) {
 | 
					func (engine *Engine) NotFound404(handlers ...HandlerFunc) {
 | 
				
			||||||
	engine.NotFound(handlers...)
 | 
						engine.NoRoute(handlers...)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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.
 | 
					// Adds handlers for NoRoute. It return a 404 code by default.
 | 
				
			||||||
func (engine *Engine) NotFound(handlers ...HandlerFunc) {
 | 
					func (engine *Engine) NoRoute(handlers ...HandlerFunc) {
 | 
				
			||||||
	engine.handlers404 = handlers
 | 
						engine.handlers404 = handlers
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user