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

Cannot playground run examples for code outside stdlib #1

Open
theherk opened this issue Dec 2, 2017 · 0 comments
Open

Cannot playground run examples for code outside stdlib #1

theherk opened this issue Dec 2, 2017 · 0 comments

Comments

@theherk
Copy link
Owner

theherk commented Dec 2, 2017

As it stands, when running a godoc server with the -play option, you can only run playable examples from the stdlib. This is due to playground requests being sent to the sandbox server at play.golang.org. As a result, your code, even though it exists in your GOPATH, is not found because it actually isn't running on the local machine.

There doesn't appear to be a direct route to changing this, but there are two candidates.

  • Run gotour locally and proxy connections to play.golang.org back to this local playground server.
  • Submit patch to go with feature to run and utilize a local playground server.

Both of these are not very straight forward. It seems like a feature that go needs, so maybe it will be worth working on. Anybody that wants to pick up the torch on such a core contribution has by bow.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant