aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--app.yaml5
-rw-r--r--appengine.go (renamed from gotour/appengine.go)0
-rw-r--r--content/welcome.article45
-rw-r--r--fmt.go (renamed from gotour/fmt.go)0
-rw-r--r--gotour/main.go15
-rw-r--r--local.go (renamed from gotour/local.go)2
-rw-r--r--tour.go (renamed from gotour/tour.go)2
8 files changed, 41 insertions, 39 deletions
diff --git a/README.md b/README.md
index 3db4f9a..0f4cce8 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,11 @@
A Tour of Go is an introduction to the Go programming language.
-The easiest way to install the tour locally is to install
-[a binary release of Go](https://golang.org/dl/) and then run:
-
- $ go tool tour
-
-To install the tour from source, first
+To install the tour from source, first
[set up a workspace](https://golang.org/doc/code.html) and then run:
- $ go get golang.org/x/tour/gotour
+ $ go get golang.org/x/tour
-This will place a `gotour` binary in your workspace's `bin` directory.
+This will place a `tour` binary in your workspace's `bin` directory.
Unless otherwise noted, the go-tour source files are distributed
under the BSD-style license found in the LICENSE file.
diff --git a/app.yaml b/app.yaml
index dfff2d5..e6552eb 100644
--- a/app.yaml
+++ b/app.yaml
@@ -1,5 +1,4 @@
-application: go-tour
-version: 1
+service: tour
runtime: go
api_version: go1
@@ -7,7 +6,7 @@ default_expiration: "7d"
handlers:
-# Keep these static file handlers in sync with gotour/local.go.
+# Keep these static file handlers in sync with local.go.
- url: /favicon.ico
static_files: static/img/favicon.ico
upload: static/img/favicon.ico
diff --git a/gotour/appengine.go b/appengine.go
index 4767a2c..4767a2c 100644
--- a/gotour/appengine.go
+++ b/appengine.go
diff --git a/content/welcome.article b/content/welcome.article
index 791b73c..6df361f 100644
--- a/content/welcome.article
+++ b/content/welcome.article
@@ -70,48 +70,41 @@ The tour is available in other languages:
Click the [[javascript:highlightAndClick(".next-page")]["next"]] button or type `PageDown` to continue.
#appengine: * Go offline
-#appengine:
+#appengine:
#appengine: This tour is also available as a stand-alone program that you can use
#appengine: without access to the internet.
-#appengine:
+#appengine:
#appengine: The stand-alone tour is faster, as it builds and runs the code samples
#appengine: on your own machine.
-#appengine:
-#appengine: To run the tour locally first
-#appengine: [[https://golang.org/dl/][download and install Go]]
-#appengine: then start the tour from the command line:
-#appengine:
-#appengine: go tool tour
-#appengine:
-#appengine: Or, you can install and run this tour manually if you have any trouble
-#appengine: running the above command:
-#appengine:
-#appengine: go get golang.org/x/tour/gotour
-#appengine: gotour
-#appengine:
+#appengine:
+#appengine: To run the tour locally install and run the tour binary:
+#appengine:
+#appengine: go get golang.org/x/tour
+#appengine: tour
+#appengine:
#appengine: The tour program will open a web browser displaying
#appengine: your local version of the tour.
-#appengine:
+#appengine:
#appengine: Or, of course, you can continue to take the tour through this web site.
#appengine: * The Go Playground
-#appengine:
+#appengine:
#appengine: This tour is built atop the [[https://play.golang.org/][Go Playground]], a
#appengine: web service that runs on [[https://golang.org/][golang.org]]'s servers.
-#appengine:
+#appengine:
#appengine: The service receives a Go program, compiles, links, and runs the program inside
#appengine: a sandbox, then returns the output.
-#appengine:
-#appengine: There are limitations to the programs that can be run in the playground:
-#appengine:
+#appengine:
+#appengine: There are limitations to the programs that can be run in the playground:
+#appengine:
#appengine: - In the playground the time begins at 2009-11-10 23:00:00 UTC (determining the significance of this date is an exercise for the reader). This makes it easier to cache programs by giving them deterministic output.
-#appengine:
-#appengine: - There are also limits on execution time and on CPU and memory usage, and the program cannot access external network hosts.
-#appengine:
+#appengine:
+#appengine: - There are also limits on execution time and on CPU and memory usage, and the program cannot access external network hosts.
+#appengine:
#appengine: The playground uses the latest stable release of Go.
-#appengine:
+#appengine:
#appengine: Read "[[https://blog.golang.org/playground][Inside the Go Playground]]" to learn more.
-#appengine:
+#appengine:
#appengine: .play welcome/sandbox.go
* Congratulations
diff --git a/gotour/fmt.go b/fmt.go
index 0a0be16..0a0be16 100644
--- a/gotour/fmt.go
+++ b/fmt.go
diff --git a/gotour/main.go b/gotour/main.go
new file mode 100644
index 0000000..b0b2d50
--- /dev/null
+++ b/gotour/main.go
@@ -0,0 +1,15 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "io"
+ "os"
+)
+
+func main() {
+ io.WriteString(os.Stderr, "golang.org/x/tour/gotour has moved to golang.org/x/tour\n")
+ os.Exit(1)
+}
diff --git a/gotour/local.go b/local.go
index c51010f..170dcf0 100644
--- a/gotour/local.go
+++ b/local.go
@@ -106,7 +106,7 @@ func main() {
origin := &url.URL{Scheme: "http", Host: host + ":" + port}
http.Handle(socketPath, socket.NewHandler(origin))
- // Keep these static file handlers in sync with ../app.yaml.
+ // Keep these static file handlers in sync with app.yaml.
static := http.FileServer(http.Dir(root))
http.Handle("/content/img/", static)
http.Handle("/static/", static)
diff --git a/gotour/tour.go b/tour.go
index 0d6ea3b..1a74285 100644
--- a/gotour/tour.go
+++ b/tour.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main // import "golang.org/x/tour/gotour"
+package main // import "golang.org/x/tour"
import (
"bytes"