mirror of
https://github.com/gin-gonic/gin.git
synced 2025-06-22 19:44:54 +08:00
Cleaning up performance branch
This commit is contained in:
@ -125,13 +125,5 @@ func (group *RouterGroup) combineHandlers(handlers []HandlerFunc) []HandlerFunc
|
||||
}
|
||||
|
||||
func (group *RouterGroup) calculateAbsolutePath(relativePath string) string {
|
||||
if len(relativePath) == 0 {
|
||||
return group.absolutePath
|
||||
}
|
||||
absolutePath := path.Join(group.absolutePath, relativePath)
|
||||
appendSlash := lastChar(relativePath) == '/' && lastChar(absolutePath) != '/'
|
||||
if appendSlash {
|
||||
return absolutePath + "/"
|
||||
}
|
||||
return absolutePath
|
||||
return joinPaths(group.absolutePath, relativePath)
|
||||
}
|
||||
|
Reference in New Issue
Block a user