Skip to content
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

Add descriptions for path.Clean and filepath.Clean #39236

Closed
howjmay opened this issue May 24, 2020 · 1 comment
Closed

Add descriptions for path.Clean and filepath.Clean #39236

howjmay opened this issue May 24, 2020 · 1 comment

Comments

@howjmay
Copy link
Contributor

howjmay commented May 24, 2020

What version of Go are you using (go version)?

$ go version

go version go1.14 Linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

Linux on x86

What did you do?

What did you expect to see?

The description of the documents for path.Clean and filepath.Clean not mention the difference between them. The implementation and the test cases are almost the same (the test cases are exactly the same). Do we need to append some description about the difference between the usage of these two functions to the current documents?

What did you see instead?

@ianlancetaylor
Copy link
Contributor

The difference between path.Clean and filepath.Clean is that the former works on slash-separated paths, and the latter works on paths separated using OS-specific separator characters (such as backslash on Windows). This is documented in the function docs if you read closely, and it is documented in the package docs of the path and filepath/path packages.

@golang golang locked and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants