Text file tour/welcome.article

     1  Welcome!
     2  Learn how to use this tour: including how to navigate the different lessons and how to run code.
     3  
     4  The Go Authors
     5  https://golang.org
     6  
     7  * Hello, 世界
     8  
     9  Welcome to a tour of the [[/][Go programming language]].
    10  
    11  The tour is divided into a list of modules that you can
    12  access by clicking on
    13  [[javascript:highlight(".logo")][A Tour of Go]] on the top left of the page.
    14  
    15  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.
    16  
    17  Throughout the tour you will find a series of slides and exercises for you
    18  to complete.
    19  
    20  You can navigate through them using
    21  
    22  - [[javascript:highlight(".prev-page")]["previous"]] or `PageUp` to go to the previous page,
    23  
    24  - [[javascript:highlight(".next-page")]["next"]] or `PageDown` to go to the next page.
    25  
    26  The tour is interactive. Click the
    27  [[javascript:highlightAndClick("#run")][Run]] button now
    28  (or press `Shift` + `Enter`) to compile and run the program on
    29  #appengine: a remote server.
    30  your computer.
    31  The result is displayed below the code.
    32  
    33  These example programs demonstrate different aspects of Go. The programs in the tour are meant to be starting points for your own experimentation.
    34  
    35  Edit the program and run it again.
    36  
    37  When you click on [[javascript:highlightAndClick("#format")][Format]]
    38  (shortcut: `Ctrl` + `Enter`), the text in the editor is formatted using the
    39  [[/cmd/gofmt/][gofmt]] tool. You can switch syntax highlighting on and off
    40  by clicking on the [[javascript:highlightAndClick(".syntax-checkbox")][syntax]] button.
    41  
    42  When you're ready to move on, click the [[javascript:highlightAndClick(".next-page")][right arrow]] below or type the `PageDown` key.
    43  
    44  .play welcome/hello.go
    45  
    46  * Go local
    47  
    48  The tour is available in other languages:
    49  
    50  - [[https://go-tour-br.appspot.com/][Brazilian Portuguese — Português do Brasil]]
    51  - [[https://go-tour-ca.appspot.com/][Catalan — Català]]
    52  - [[https://tour.go-zh.org/][Simplified Chinese — 中文(简体)]]
    53  - [[https://go-tour-cz.appspot.com/][Czech — Česky]]
    54  - [[https://go-tour-id2.appspot.com/][Indonesian — Bahasa Indonesia]]
    55  - [[https://go-tour-jp.appspot.com/][Japanese — 日本語]]
    56  - [[https://go-tour-ko.appspot.com/][Korean — 한국어]]
    57  - [[https://go-tour-pl1.appspot.com/][Polish — Polski]]
    58  - [[https://go-tour-lat.appspot.com/][Spanish — Español]]
    59  - [[https://go-tour-th.appspot.com/][Thai — ภาษาไทย]]
    60  - [[https://go-tour-ua-translation.lm.r.appspot.com/][Ukrainian — Українською]]
    61  
    62  Click the [[javascript:highlightAndClick(".next-page")]["next"]] button or type `PageDown` to continue.
    63  
    64  #appengine: * Go offline (optional)
    65  #appengine:
    66  #appengine: This tour is also available as a stand-alone program that you can use
    67  #appengine: without access to the internet. It builds and runs the code samples on
    68  #appengine: your own machine.
    69  #appengine:
    70  #appengine: To run the tour locally, you'll need to first
    71  #appengine: [[/doc/install][install Go]] and then run:
    72  #appengine:
    73  #appengine:   go install golang.org/x/website/tour@latest
    74  #appengine:
    75  #appengine: This will place a `tour` binary in your
    76  #appengine: [[/cmd/go/#hdr-GOPATH_and_Modules][GOPATH]]'s `bin` directory.
    77  #appengine: When you run the tour program, it will open a web browser displaying
    78  #appengine: your local version of the tour.
    79  #appengine:
    80  #appengine: Of course, you can continue to take the tour through this web site.
    81  
    82  #appengine: * The Go Playground
    83  #appengine:
    84  #appengine: This tour is built atop the [[https://play.golang.org/][Go Playground]], a
    85  #appengine: web service that runs on [[/][golang.org]]'s servers.
    86  #appengine:
    87  #appengine: The service receives a Go program, compiles, links, and runs the program inside
    88  #appengine: a sandbox, then returns the output.
    89  #appengine:
    90  #appengine: There are limitations to the programs that can be run in the playground:
    91  #appengine:
    92  #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.
    93  #appengine:
    94  #appengine: - There are also limits on execution time and on CPU and memory usage, and the program cannot access external network hosts.
    95  #appengine:
    96  #appengine: The playground uses the latest stable release of Go.
    97  #appengine:
    98  #appengine: Read "[[/blog/playground][Inside the Go Playground]]" to learn more.
    99  #appengine:
   100  #appengine: .play welcome/sandbox.go
   101  
   102  * Congratulations
   103  
   104  You've finished the first module of the tour!
   105  
   106  Now click on [[javascript:highlightAndClick(".logo")][A Tour of Go]] to find out what else
   107  you can learn about Go, or go directly to the [[javascript:click('.next-page')][next lesson]].
   108  

View as plain text