mirror of
https://github.com/golang/go
synced 2024-11-19 22:04:44 -07:00
path: document that Clean deletes trailing slashes.
Fixes #3492. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6112044
This commit is contained in:
parent
11820899a5
commit
5fc2af1f77
@ -30,6 +30,9 @@ const (
|
|||||||
// that is, replace "/.." by "/" at the beginning of a path,
|
// that is, replace "/.." by "/" at the beginning of a path,
|
||||||
// assuming Separator is '/'.
|
// assuming Separator is '/'.
|
||||||
//
|
//
|
||||||
|
// The returned path ends in a slash only if it represents a root directory,
|
||||||
|
// such as "/" on Unix or `C:\` on Windows.
|
||||||
|
//
|
||||||
// If the result of this process is an empty string, Clean
|
// If the result of this process is an empty string, Clean
|
||||||
// returns the string ".".
|
// returns the string ".".
|
||||||
//
|
//
|
||||||
|
@ -21,6 +21,8 @@ import (
|
|||||||
// 4. Eliminate .. elements that begin a rooted path:
|
// 4. Eliminate .. elements that begin a rooted path:
|
||||||
// that is, replace "/.." by "/" at the beginning of a path.
|
// that is, replace "/.." by "/" at the beginning of a path.
|
||||||
//
|
//
|
||||||
|
// The returned path ends in a slash only if it is the root "/".
|
||||||
|
//
|
||||||
// If the result of this process is an empty string, Clean
|
// If the result of this process is an empty string, Clean
|
||||||
// returns the string ".".
|
// returns the string ".".
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user