aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-04-24 13:17:05 +1000
committerRob Pike <r@golang.org>2012-04-24 13:17:05 +1000
commit5fc2af1f777f0544c2813e67ba92a26b0c8be4f2 (patch)
treee8eb4849691c8ed7a218f419f6df513d85ff8e6e /src/pkg/path/filepath
parent11820899a58094be1afa22987ce080cb2fb66b86 (diff)
downloadgo-5fc2af1f777f0544c2813e67ba92a26b0c8be4f2.tar.xz
path: document that Clean deletes trailing slashes.
Fixes #3492. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6112044
Diffstat (limited to 'src/pkg/path/filepath')
-rw-r--r--src/pkg/path/filepath/path.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/path/filepath/path.go b/src/pkg/path/filepath/path.go
index 1e74872636..a4e429baec 100644
--- a/src/pkg/path/filepath/path.go
+++ b/src/pkg/path/filepath/path.go
@@ -30,6 +30,9 @@ const (
// that is, replace "/.." by "/" at the beginning of a path,
// 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
// returns the string ".".
//