Skip to content

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

@katiehockman

Description

@katiehockman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions