-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path, path/filepath: document that Clean removes trailing slash #3492
Labels
Milestone
Comments
Both ways are fine with me, but at http://golang.org/pkg/path/#Clean it isn't mentioned and I don't want my program to break just because the compiler was made compliant with the definition. So I just want to know if I have to expect a change in the definition or a change in the implementation of the compiler |
If the documentation is unclear should be updated. The returned path will be as clean as it can be. Labels changed: added priority-soon, documentation, removed priority-triage. Owner changed to @robpike. Status changed to Accepted. |
Comment 5 by jo@durchholz.org: The trailing slash should be removed. That way, the cleaned path will work not just for directories but for files as well. The main description is clear ("shortest equivalent"), but the detail explanation on http://golang.org/pkg/path/filepath/#Clean shoud list trailing slash removal as fifth point. |
This issue was closed by revision 5fc2af1. Status changed to Fixed. |
robpike
added a commit
that referenced
this issue
May 11, 2015
««« backport ab273014412e path: document that Clean deletes trailing slashes. Fixes #3492. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6112044 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by Scheintoter:
The text was updated successfully, but these errors were encountered: