chore: upgrade golangci-lint and fix golangci-lint error (#3278)

This commit is contained in:
thinkerou
2022-08-15 21:38:20 +08:00
committed by GitHub
parent 1b5ba251cf
commit b04917c53e
12 changed files with 74 additions and 60 deletions

12
path.go
View File

@ -10,12 +10,12 @@ package gin
//
// The following rules are applied iteratively until no further processing can
// be done:
// 1. Replace multiple slashes with a single slash.
// 2. Eliminate each . path name element (the current directory).
// 3. Eliminate each inner .. path name element (the parent directory)
// along with the non-.. element that precedes it.
// 4. Eliminate .. elements that begin a rooted path:
// that is, replace "/.." by "/" at the beginning of a path.
// 1. Replace multiple slashes with a single slash.
// 2. Eliminate each . path name element (the current directory).
// 3. Eliminate each inner .. path name element (the parent directory)
// along with the non-.. element that precedes it.
// 4. Eliminate .. elements that begin a rooted path:
// that is, replace "/.." by "/" at the beginning of a path.
//
// If the result of this process is an empty string, "/" is returned.
func cleanPath(p string) string {