From: Russ Cox Date: Tue, 19 Feb 2013 18:24:03 +0000 (-0500) Subject: path/filepath: document Dir better X-Git-Tag: go1.1rc2~965 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6df181a7f01bc40a2ad9e98510b43b653eb7fb3b;p=gostls13.git path/filepath: document Dir better This comment matches the one in path. Fixes #4837. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7305100 --- diff --git a/src/pkg/path/filepath/path.go b/src/pkg/path/filepath/path.go index bcb81824ab..c065b03beb 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.