[x/tour] tour: build snippets in module mode

We want to start building snippets in module mode rather than legacy
legacy GOPATH mode, to make tour work well when there's no tour code
in GOPATH/src and to be more future-proof. Building in module mode
means we need to specify a go.mod file to use for each snippet.

The tour web UI design predates the module mode and its go.mod files.
Txtar-based multi-file support was added to the playground (that the
tour uses for executing snippets) in golang.org/issue/32040, but the
web UI hasn't been updated to have first-class separate <textarea>
elements or tabs for editing multiple files.

For now, we can get by with providing a default go.mod file for all
tour snippets, since they only need some packages in the tour module.

Update to a newer version of the golang.org/x/tools/playground/socket
package which includes multi-file snippet support added in CL 204237.

For golang/go#44243.

Change-Id: Ib05725c52fbe43658b2f22ac728b1e901e635824
Reviewed-on: https://go-review.googlesource.com/c/tour/+/291889
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
X-Tour-Commit: b72029adf3393d3635828fedcddd5ae7053d3250
3 files changed
tree: b9521aa3380c89d541b997b8704fe4f2d54c889c
  1. tour/
  2. AUTHORS
  3. CONTRIBUTING.md
  4. CONTRIBUTORS
  5. LICENSE
  6. PATENTS
  7. README.md
README.md

Go Website

This repository holds the Go Website server code and content.

Download/Install

The easiest way to install is to run go get -u golang.org/x/website. You can also manually git clone the repository to $GOPATH/src/golang.org/x/website.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/website:” in the subject line, so it is easy to find.