You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi. I have written a small package with an example which runs fine locally, but doesn't work through the web interface of either my local godoc or pkg.go.dev.
The test attempts to access files in the testdata directories of submodules in the package. I imagine this is not permitted for security reasons.
I'd be grateful for a pointer to the restrictions on web-runnable example tests, and to learn if there is way of providing files to my example programme.
Many thanks,
Rory
Charles Pustejovsky
unread,
Jan 20, 2025, 2:05:27 PM1/20/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
It looks like you're code is failing because you're trying to open from
Your operator is opening new Mboxs and the paths you pass in are assuming the main.go is called from that directory.
I'm not sure how you would resolve this. Since there hasn't been an answer on here, I'd recommend posting the question to the testing channel of the Gopher Slack
Sean Liao
unread,
Jan 20, 2025, 2:21:38 PM1/20/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rory Campbell-Lange, golang-nuts
The playground, which also serves pkg.go.dev examples. runs in an
isolated environment with just the built test/example binary, without
the source code.
Consider embedding any files you need with "embed" and accessing them
through io/fs.FS rather than through os calls.