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.

https://github.com/rorycl/mailboxoperator/blob/main/mbox/mbox.go#L28

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 <https://invite.slack.golangbridge.org/>


On Friday, January 10, 2025 at 3:52:20 AM UTC-5 Rory Campbell-Lange wrote:

> 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.
>
> https://pkg.go.dev/github.com/rorycl/mailbox...@v0.0.4#example-package 
> <https://pkg.go.dev/github.com/rorycl/mailboxoperator@v0.0.4#example-package>
>
> 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
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/880ec12c-77ed-41de-9c73-b1573f5121b8n%40googlegroups.com.

Reply via email to