mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-11-04 09:12:12 +08:00 
			
		
		
		
	Renames NotFound404 to NotFound
This commit is contained in:
		
							parent
							
								
									15c27c712d
								
							
						
					
					
						commit
						d91cfbade4
					
				@ -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...)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								gin.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user