README.md: update example commands and remove redundant text 1. Pass the payload to `/compile` using `curl --upload` instead of `curl --data`. With the `--data` flag, curl encodes the data in a way that triggers the call to `(*http.Request).FormValue` (sandbox.go:56) to consume the request body. When we then attempt to decode the body as JSON (sandbox.go:58), we then fail the request with `io.EOF`. If we use the `--upload` flag instead, curl does not set the content type to the problematic `application/x-www-form-urlencoded` value, and the call to `FormValue` does not consume the body. 2. Add a name to the `docker run` command line. (That makes it easier to kill the container when we're done with it.) 3. Remove a redundant copy of the “To submit changes…” sentence. Change-Id: I314d904f626029306fecbfd25b166927dfa01029 Reviewed-on: https://go-review.googlesource.com/106215 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This subrepository holds the source for the Go playground: https://play.golang.org/
# build the image docker build -t playground .
docker run --name=play --rm -d -p 8080:8080 playground # run some Go code cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile
gcloud --project=golang-org --account=person@example.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.