From b33f331d7170b2b38d4c4e859e8a333aae05897f Mon Sep 17 00:00:00 2001 From: citizen233 Date: Tue, 31 Aug 2021 10:24:33 +0800 Subject: [PATCH] feat: format code --- routes_test.go | 2 +- tree.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes_test.go b/routes_test.go index 85805f83..ffe3469e 100644 --- a/routes_test.go +++ b/routes_test.go @@ -635,4 +635,4 @@ func TestRouteContextHoldsFullPath(t *testing.T) { w := performRequest(router, http.MethodGet, "/not-found") assert.Equal(t, http.StatusNotFound, w.Code) -} \ No newline at end of file +} diff --git a/tree.go b/tree.go index 0cd3367b..b23ccfd5 100644 --- a/tree.go +++ b/tree.go @@ -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 } }