Skip to content

Commit

Permalink
path: document that Clean deletes trailing slashes.
Browse files Browse the repository at this point in the history
Fixes #3492.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6112044
  • Loading branch information
robpike committed Apr 24, 2012
1 parent 1182089 commit 5fc2af1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pkg/path/filepath/path.go
Expand Up @@ -30,6 +30,9 @@ const (
// that is, replace "/.." by "/" at the beginning of a path,
// assuming Separator is '/'.
//
// The returned path ends in a slash only if it represents a root directory,
// such as "/" on Unix or `C:\` on Windows.
//
// If the result of this process is an empty string, Clean
// returns the string ".".
//
Expand Down
2 changes: 2 additions & 0 deletions src/pkg/path/path.go
Expand Up @@ -21,6 +21,8 @@ import (
// 4. Eliminate .. elements that begin a rooted path:
// that is, replace "/.." by "/" at the beginning of a path.
//
// The returned path ends in a slash only if it is the root "/".
//
// If the result of this process is an empty string, Clean
// returns the string ".".
//
Expand Down

0 comments on commit 5fc2af1

Please sign in to comment.