]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: document Dir better
authorRuss Cox <rsc@golang.org>
Tue, 19 Feb 2013 18:24:03 +0000 (13:24 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 19 Feb 2013 18:24:03 +0000 (13:24 -0500)
This comment matches the one in path.

Fixes #4837.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7305100

src/pkg/path/filepath/path.go

index bcb81824abd04995ae8ff6232f63edf76ae03ce2..c065b03bebf31d639505230efe1a0d52d9bc22ca 100644 (file)
@@ -437,7 +437,8 @@ func Base(path string) string {
 }
 
 // Dir returns all but the last element of path, typically the path's directory.
-// Trailing path separators are removed before processing.
+// After dropping the final element, the path is Cleaned and trailing
+// slashes are removed.
 // If the path is empty, Dir returns ".".
 // If the path consists entirely of separators, Dir returns a single separator.
 // The returned path does not end in a separator unless it is the root directory.