Skip to content

Commit

Permalink
path: sync code with httprouter (gin-gonic#2212)
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 authored and appleboy committed Jan 16, 2020
1 parent 424e968 commit ace6e4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand All @@ -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 "/"
Expand Down

0 comments on commit ace6e4c

Please sign in to comment.