Skip to content

Commit

Permalink
CleanPath: remove impossible check
Browse files Browse the repository at this point in the history
  • Loading branch information
julienschmidt committed Jun 8, 2014
1 parent c2b822d commit 9866532
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions path.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package httprouter
//
// If the result of this process is an empty string, "/" is returned
func CleanPath(p string) string {
// Turn empty string into "/"
if p == "" {
return "/"
}
Expand Down Expand Up @@ -102,11 +103,6 @@ func CleanPath(p string) string {
w++
}

// Turn empty string into "/"
if w == 0 {
return "/"
}

if buf == nil {
return p[:w]
}
Expand Down

0 comments on commit 9866532

Please sign in to comment.