Cleaning up performance branch

This commit is contained in:
Manu Mtz-Almeida
2015-04-07 12:22:38 +02:00
parent 3faa81a464
commit 1f6304ca25
6 changed files with 127 additions and 135 deletions

View File

@ -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)
}