feat: format code

This commit is contained in:
citizen233 2021-08-31 10:24:33 +08:00
parent 86831de61c
commit b33f331d71
2 changed files with 2 additions and 2 deletions

View File

@ -635,4 +635,4 @@ func TestRouteContextHoldsFullPath(t *testing.T) {
w := performRequest(router, http.MethodGet, "/not-found")
assert.Equal(t, http.StatusNotFound, w.Code)
}
}

View File

@ -600,7 +600,7 @@ walk: // Outer loop for walking the tree
// extra trailing slash if a leaf exists for that path
value.tsr = path == "/" ||
(len(prefix) == len(path)+1 && prefix[len(path)] == '/' &&
path == prefix[:len(prefix) - 1] && n.handlers != nil)
path == prefix[:len(prefix)-1] && n.handlers != nil)
return
}
}