-
Notifications
You must be signed in to change notification settings - Fork 9
Description
There might be a a way to run Go code examples from a statically hosted 'represent' slide in the main public Go playground. Create a URL with a POST, then display in an iframe?
<Tv> ohh at least godoc.org just redirects you to play.golang.org
<Tv> cmars: sounds likely <Tv> http://godoc.org/encoding/json#example-Decoder <- click play
Tv: interesting... i wonder how that play link was created? automatically by godoc i assume <Tv> http://golang.org/pkg/encoding/json/#example_Decoder POSTs to http://golang.org/compile
<Tv> curl http://golang.org/compile --data-urlencode body='package main' <Tv> {"compile_errors":"runtime.main: undefined: main.main\n [process exited with non-zero status]\n","output":""}
ah :)
<Tv> -d version=2 also if you want to emulate it more <Tv> maybe the redirect was just to avoid rewriting the form editing ui
I recommend looking at talks.godoc.org. It runs code in place.`