update comment (#1057)

This commit is contained in:
田欧
2017-08-16 11:55:50 +08:00
committed by Bo-Yi Wu
parent ecae34c4e1
commit a8fa424ae5
13 changed files with 48 additions and 49 deletions

View File

@ -17,7 +17,7 @@ package gin
// 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
// If the result of this process is an empty string, "/" is returned.
func cleanPath(p string) string {
// Turn empty string into "/"
if p == "" {
@ -109,7 +109,7 @@ func cleanPath(p string) string {
return string(buf[:w])
}
// internal helper to lazily create a buffer if necessary
// internal helper to lazily create a buffer if necessary.
func bufApp(buf *[]byte, s string, w int, c byte) {
if *buf == nil {
if s[w] == c {