That's a really helpful comment. I'll give the embed/fs.FS approach a go -- thank you.
On 20/01/25, Sean Liao (s...@liao.dev) wrote: > 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. > > - sean > > On Fri, Jan 10, 2025 at 8:51 AM Rory Campbell-Lange > <r...@campbell-lange.net> 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/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/Z4Dfdk3g6ssaeuDk%40campbell-lange.net. -- 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/Z49hvzM4YLnshXEA%40campbell-lange.net.