aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/path.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-08-30 11:16:41 -0700
committerRob Pike <r@golang.org>2012-08-30 11:16:41 -0700
commitb7627d3d1f238e484d08bb8abb770cbe91482bc4 (patch)
treed5cfeef54a0679e2f551c6103fcbb2711554777e /src/pkg/path/path.go
parente61c047c3e5ac3ad253c9046d479d769d14f7808 (diff)
downloadgo-b7627d3d1f238e484d08bb8abb770cbe91482bc4.tar.xz
path: improve documentation for Dir
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6495059
Diffstat (limited to 'src/pkg/path/path.go')
-rw-r--r--src/pkg/path/path.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/path/path.go b/src/pkg/path/path.go
index 649c1504c8..bdb85c6b92 100644
--- a/src/pkg/path/path.go
+++ b/src/pkg/path/path.go
@@ -198,7 +198,8 @@ func IsAbs(path string) bool {
}
// Dir returns all but the last element of path, typically the path's directory.
-// The path is Cleaned and trailing slashes are removed before processing.
+// After dropping the final element using Split, the path is Cleaned and trailing
+// slashes are removed.
// If the path is empty, Dir returns ".".
// If the path consists entirely of slashes followed by non-slash bytes, Dir
// returns a single slash. In any other case, the returned path does not end in a