commit | 87a94674c2ab6c19b7c7e499663f81fc3b66649e | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <dmitshur@golang.org> | Wed Mar 03 19:35:43 2021 -0500 |
committer | Dmitri Shuralyov <dmitshur@golang.org> | Fri Mar 05 16:09:21 2021 +0000 |
tree | f131c2c7c43928d1e42e8d40f2906c3769e0f1c6 | |
parent | 4089f7017cc140df75cf77cbe6667ae9bd0b7f0f [diff] |
[x/tour] tour: look for content in module cache, not GOROOT/misc/tour Tour content hasn't been available in GOROOT since Go 1.12¹, so stop looking for it there. A more useful fallback place to find tour content is the module cache. When the golang.org/x/tour is in the build list, it will be found via build.Import. It will not be found, however, when the tour binary is run outside of a module. This situation is more common as of Go 1.16, since the default GO111MODULE value changed to on². If the version of the tour binary is known, access the content for that version from the module cache. In the future, this complex and imperfect machinery will be replaced with simply embedding the needed files in the binary. We can't do that quite yet (not without duplicating a lot of code) because Go 1.15 is supported, and because Go 1.14 is used for deployment. It's not neccessary to provide a custom socket.Environ (which served to provide a custom GOPATH value pointing inside GOROOT; that path is being removed here). Delete it along with some other unused code. ¹ https://golang.org/doc/go1.12#tour ² https://golang.org/doc/go1.16#modules Fixes golang/go#44243. Change-Id: Ia239700170b8614d21cafe9617b51dddf3e337d5 Reviewed-on: https://go-review.googlesource.com/c/tour/+/298529 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> X-Tour-Commit: b3263fcf7749f3600c8928d5f7d4e8a66a34b74f
This repository holds the Go Website server code and content.
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
.
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.