commit | 66c23b73d8f39db53b3e8903a844e6aaf3db0457 | [log] [tgz] |
---|---|---|
author | Bryan C. Mills <bcmills@google.com> | Wed Apr 11 01:01:01 2018 -0400 |
committer | Bryan C. Mills <bcmills@google.com> | Thu Apr 12 18:50:14 2018 +0000 |
tree | 3e0ddd92fef0d5bfd58cbb61f0f52dce09b6ef94 | |
parent | f980e90afdd2f5e31b197bc985c4b48472092a0c [diff] |
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.