blob: 056041031b0584fc45c1cd07a1a162f6d6dbb000 [file] [log] [blame]
Learn how to use this tour: including how to navigate the different lessons and how to run code.
The Go Authors
* Hello, 世界
Welcome to a tour of the [[][Go programming language]].
The tour is divided into a list of modules that you can
access by clicking on
[[javascript:highlight(".logo")][A Tour of Go]] on the top left of the page.
You can also view the table of contents at any time by clicking on the [[javascript:highlightAndClick(".nav")][menu]] on the top right of the page.
Throughout the tour you will find a series of slides and exercises for you
to complete.
You can navigate through them using
- [[javascript:highlight(".prev-page")]["previous"]] or `PageUp` to go to the previous page,
- [[javascript:highlight(".next-page")]["next"]] or `PageDown` to go to the next page.
The tour is interactive. Click the
[[javascript:highlightAndClick("#run")][Run]] button now
(or type `shift-enter`) to compile and run the program on
#appengine: a remote server.
your computer.
The result is displayed below the code.
These example programs demonstrate different aspects of Go. The programs in the tour are meant to be starting points for your own experimentation.
Edit the program and run it again.
Note that when you click on [[javascript:highlightAndClick("#format")][Format]] or `ctrl-enter`
the text in the editor is formatted using the
[[][gofmt]] tool. You can switch syntax highlighting on and off
by clicking on the [[javascript:highlightAndClick(".syntax-checkbox")][syntax]] button.
When you're ready to move on, click the [[javascript:highlightAndClick(".next-page")][right arrow]] below or type the `PageDown` key.
.play welcome/hello.go
* Go local
The tour is available in other languages:
- [[][Brazilian Portuguese — Português do Brasil]]
- [[][Catalan — Català]]
- [[][German — Deutsch]]
- [[][Spanish — Español]]
- [[][French — Français]]
- [[][Indonesia — Bahasa]]
- [[][Italian — Italiano]]
- [[][Hebrew — עִבְרִית]]
- [[][Japanese — 日本語]]
- [[][Korean — 한국어]]
- [[][Romanian — Română]]
- [[][Simplified Chinese — 中文(简体)]]
- [[][Traditional Chinese — 中文(繁體)]]
- [[][Ukrainian — Українська]]
- [[][Uzbek — Ўзбекча]]
- [[][Turkish - Türkçe]]
Click the [[javascript:highlightAndClick(".next-page")]["next"]] button or type `PageDown` to continue.
#appengine: * Go offline
#appengine: This tour is also available as a stand-alone program that you can use
#appengine: without access to the internet.
#appengine: The stand-alone tour is faster, as it builds and runs the code samples
#appengine: on your own machine.
#appengine: To run the tour locally first
#appengine: [[][download and install Go]]
#appengine: then start the tour from the command line:
#appengine: go tool tour
#appengine: The tour program will open a web browser displaying
#appengine: your local version of the tour.
#appengine: Or, of course, you can continue to take the tour through this web site.
#appengine: * The Go Playground
#appengine: This tour is built atop the [[][Go Playground]], a
#appengine: web service that runs on [[][]]'s servers.
#appengine: The service receives a Go program, compiles, links, and runs the program inside
#appengine: a sandbox, then returns the output.
#appengine: There are limitations to the programs that can be run in the playground:
#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: - There are also limits on execution time and on CPU and memory usage, and the program cannot access external network hosts.
#appengine: The playground uses the latest stable release of Go.
#appengine: Read "[[][Inside the Go Playground]]" to learn more.
#appengine: .play welcome/sandbox.go
* Congratulations
You've finished the first module of the tour!
Now click on [[javascript:highlightAndClick(".logo")][A Tour of Go]] to find out what else
you can learn about Go, or go directly to the [[javascript:click('.next-page')][next lesson]].