1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00

erge branch 'master' into routing_misses_performance_improvements

This commit is contained in:
Pablo Andres Fuente
2020-12-14 03:36:12 +00:00
19 changed files with 475 additions and 46 deletions

View File

@ -449,7 +449,9 @@ func (r *Router) Find(method, path string, c Context) {
pos := strings.IndexByte(ns, '/')
if pos == -1 {
// If no slash is remaining in search string set param value
pvalues[len(cn.pnames)-1] = search
if len(cn.pnames) > 0 {
pvalues[len(cn.pnames)-1] = search
}
break
} else if pos > 0 {
// Otherwise continue route processing with restored next node