From ace6e4c2eac3acd6e6df75fa10fff17ee9319382 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 16 Jan 2020 22:40:59 +0800 Subject: [PATCH] path: sync code with httprouter (#2212) --- path.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/path.go b/path.go index a6bac7b..37247d4 100644 --- a/path.go +++ b/path.go @@ -5,8 +5,6 @@ package gin -const stackBufSize = 128 - // cleanPath is the URL version of path.Clean, it returns a canonical URL path // for p, eliminating . and .. elements. // @@ -21,6 +19,7 @@ const stackBufSize = 128 // // If the result of this process is an empty string, "/" is returned. func cleanPath(p string) string { + const stackBufSize = 128 // Turn empty string into "/" if p == "" { return "/"