Rewording the comments for Join to do a better job of calling out
when Clean is called. Also clarifing other portions of the comment.
Fixes #29875
Change-Id: Ied43983bb10a97922898d28af133de0930224496
Reviewed-on: https://go-review.googlesource.com/c/go/+/194339
Reviewed-by: Rob Pike <r@golang.org>
return path[:i+1], path[i+1:]
}
-// Join joins any number of path elements into a single path, adding a
-// separating slash if necessary. The result is Cleaned; in particular,
-// all empty strings are ignored.
+// Join joins the argument's path elements into a single path,
+// separating them with slashes. The result is Cleaned. However,
+// if the argument list is empty or all its elements are empty,
+// Join returns an empty string.
func Join(elem ...string) string {
for i, e := range elem {
if e != "" {