summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-02-19 13:24:03 -0500
committerRuss Cox <rsc@golang.org>2013-02-19 13:24:03 -0500
commit82dde0c2453a8fdcd931a7962769d8b8e8f190c7 (patch)
tree0f02f5ee0b4b8961c044614748040bb9369ceaed /src
parent24e609e67944d43cd25e8b4a5e3a84cdecd769ed (diff)
downloadgo-82dde0c2453a8fdcd931a7962769d8b8e8f190c7.tar.gz
path/filepath: document Dir better
This comment matches the one in path. Fixes issue 4837. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/7305100
Diffstat (limited to 'src')
-rw-r--r--src/pkg/path/filepath/path.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/path/filepath/path.go b/src/pkg/path/filepath/path.go
index bcb81824a..c065b03be 100644
--- a/src/pkg/path/filepath/path.go
+++ b/src/pkg/path/filepath/path.go
@@ -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.