mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 21:32:25 -05:00 
			
		
		
		
	Update dependencies (#333)
This commit is contained in:
		
					parent
					
						
							
								ce22e03f9d
							
						
					
				
			
			
				commit
				
					
						182b4eea73
					
				
			
		
					 848 changed files with 377869 additions and 107280 deletions
				
			
		
							
								
								
									
										11
									
								
								vendor/github.com/gin-gonic/gin/routergroup.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/gin-gonic/gin/routergroup.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -11,11 +11,6 @@ import ( | |||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| var ( | ||||
| 	// reg match english letters for http method name | ||||
| 	regEnLetter = regexp.MustCompile("^[A-Z]+$") | ||||
| ) | ||||
| 
 | ||||
| // IRouter defines all router handle interface includes single and group router. | ||||
| type IRouter interface { | ||||
| 	IRoutes | ||||
|  | @ -92,7 +87,7 @@ func (group *RouterGroup) handle(httpMethod, relativePath string, handlers Handl | |||
| // frequently used, non-standardized or custom methods (e.g. for internal | ||||
| // communication with a proxy). | ||||
| func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) IRoutes { | ||||
| 	if matched := regEnLetter.MatchString(httpMethod); !matched { | ||||
| 	if matches, err := regexp.MatchString("^[A-Z]+$", httpMethod); !matches || err != nil { | ||||
| 		panic("http method " + httpMethod + " is not valid") | ||||
| 	} | ||||
| 	return group.handle(httpMethod, relativePath, handlers) | ||||
|  | @ -214,7 +209,9 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS | |||
| 
 | ||||
| func (group *RouterGroup) combineHandlers(handlers HandlersChain) HandlersChain { | ||||
| 	finalSize := len(group.Handlers) + len(handlers) | ||||
| 	assert1(finalSize < int(abortIndex), "too many handlers") | ||||
| 	if finalSize >= int(abortIndex) { | ||||
| 		panic("too many handlers") | ||||
| 	} | ||||
| 	mergedHandlers := make(HandlersChain, finalSize) | ||||
| 	copy(mergedHandlers, group.Handlers) | ||||
| 	copy(mergedHandlers[len(group.Handlers):], handlers) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue