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

affected/package: io/fs #57772

Closed
exyzzy opened this issue Jan 13, 2023 · 4 comments
Closed

affected/package: io/fs #57772

exyzzy opened this issue Jan 13, 2023 · 4 comments

Comments

@exyzzy
Copy link

exyzzy commented Jan 13, 2023

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

1.19.5

$ go version

Does this issue reproduce with the latest release?

yes

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

Online, but local is:
GOHOSTARCH="arm64"
GOHOSTOS="darwin"

go env Output
$ go env

What did you do?

Go Example fails
Go to: https://pkg.go.dev/io/fs#example-WalkDir
Click run
Output:
2009/11/10 23:00:00 stat /usr/local/go/bin/.: no such file or directory

Example fails in the exact same way my code is failing, so not helpful. Bug?

What did you expect to see?

A working example

What did you see instead?

A failing example

@robpike
Copy link
Contributor

robpike commented Jan 13, 2023

The error seems clear. Do your environment have a /usr/local/go/bin? If not, change the example to point to a different, extant directory and run it in an environment that can access it.

@exyzzy
Copy link
Author

exyzzy commented Jan 13, 2023

yes, it does :
% ls /usr/local/go/bin
go gofmt

does the example work for you?

@jrathert
Copy link

Locally works for me, with 1.19.4 and 1.19.5 - are you sure you are working in the right environment? (I guess the "online example" which is probably build on Go Playground cannot work as access to local file system is forbidden)

@exyzzy
Copy link
Author

exyzzy commented Jan 13, 2023

Yes, it is my issue. Locally for this example works for me too. My failing example is a bit more complex and other parts of code are affecting the traverse with a similar stat error. Apologies.
Still though, the example in playground as it stands could be more helpful. Probably should be commented that it needs to be run locally, or else provide a playground environment that works for the example. Thanks for looking into it.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
@golang golang locked and limited conversation to collaborators Jan 13, 2024
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

5 participants