mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-11-04 09:12:12 +08:00 
			
		
		
		
	Improves Copy() in gin.Context
This commit is contained in:
		
							parent
							
								
									d7a3fdcd8f
								
							
						
					
					
						commit
						12fa9fe499
					
				
							
								
								
									
										5
									
								
								gin.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								gin.go
									
									
									
									
									
								
							@ -270,11 +270,10 @@ func (group *RouterGroup) combineHandlers(handlers []HandlerFunc) []HandlerFunc
 | 
				
			|||||||
/************************************/
 | 
					/************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Context) Copy() *Context {
 | 
					func (c *Context) Copy() *Context {
 | 
				
			||||||
	cp := &Context{}
 | 
						var cp Context = *c
 | 
				
			||||||
	*cp = *c
 | 
					 | 
				
			||||||
	cp.index = AbortIndex
 | 
						cp.index = AbortIndex
 | 
				
			||||||
	cp.handlers = nil
 | 
						cp.handlers = nil
 | 
				
			||||||
	return cp
 | 
						return &cp
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Next should be used only in the middlewares.
 | 
					// Next should be used only in the middlewares.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user