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

x/pkgsite: example requiring testdata file fails when ran #45475

Open
katiehockman opened this issue Apr 9, 2021 · 2 comments
Open

x/pkgsite: example requiring testdata file fails when ran #45475

katiehockman opened this issue Apr 9, 2021 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@katiehockman
Copy link
Contributor

What is the URL of the page with the issue?

https://pkg.go.dev/archive/zip#Reader

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

Screenshot

image

What did you do?

Ran example for zip.Reader

What did you expect to see?

Output:

Contents of README:
This is the source code repository for the Go programming language.

(which is present in the output before pressing Run)

What did you see instead?

Output:

2009/11/10 23:00:00 open testdata/readme.zip: no such file or directory

Note that the same issue occurs in golang.org: https://golang.org/pkg/archive/zip/#Reader
However, it seems reasonable that it would fail, since it's being run in a browser and there isn't a testdata/readme.zip to read from. I'm not actually sure there's anything you can/want to do to fix this, but wanted to raise this as an FYI

/cc @julieqiu @jba @jamalc

@katiehockman katiehockman added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Apr 9, 2021
@gopherbot gopherbot added this to the Unreleased milestone Apr 9, 2021
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Apr 9, 2021
@mvdan
Copy link
Member

mvdan commented Feb 26, 2024

Just so I understand, with pkg.go.dev as currently designed, is opening testdata files a possibility or still limited by e.g. running inside the browser? In the original post, Katie points at a difference between golang.org/pkg and pkg.go.dev, but the former has been replaced by the latter at this point.

@jba
Copy link
Contributor

jba commented Feb 26, 2024

Not really feasible, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants