Fixing some unit tests
This commit is contained in:
		@ -28,7 +28,7 @@ const (
 | 
				
			|||||||
	MIMEMultipartPOSTForm = binding.MIMEMultipartPOSTForm
 | 
						MIMEMultipartPOSTForm = binding.MIMEMultipartPOSTForm
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const AbortIndex = math.MaxInt8 / 2
 | 
					const AbortIndex int8 = math.MaxInt8 / 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Context is the most important part of gin. It allows us to pass variables between middleware,
 | 
					// Context is the most important part of gin. It allows us to pass variables between middleware,
 | 
				
			||||||
// manage the flow, validate the JSON of a request and render a JSON response for example.
 | 
					// manage the flow, validate the JSON of a request and render a JSON response for example.
 | 
				
			||||||
 | 
				
			|||||||
@ -148,7 +148,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func (group *RouterGroup) combineHandlers(handlers HandlersChain) HandlersChain {
 | 
					func (group *RouterGroup) combineHandlers(handlers HandlersChain) HandlersChain {
 | 
				
			||||||
	finalSize := len(group.Handlers) + len(handlers)
 | 
						finalSize := len(group.Handlers) + len(handlers)
 | 
				
			||||||
	if finalSize >= AbortIndex {
 | 
						if finalSize >= int(AbortIndex) {
 | 
				
			||||||
		panic("too many handlers")
 | 
							panic("too many handlers")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	mergedHandlers := make(HandlersChain, finalSize)
 | 
						mergedHandlers := make(HandlersChain, finalSize)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user