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-th.appspot.com/][Thai — ภาษาไทย]]
    59  
    60  Click the [[javascript:highlightAndClick(".next-page")]["next"]] button or type `PageDown` to continue.
    61  
    62  #appengine: * Go offline (optional)
    63  #appengine:
    64  #appengine: This tour is also available as a stand-alone program that you can use
    65  #appengine: without access to the internet. It builds and runs the code samples on
    66  #appengine: your own machine.
    67  #appengine:
    68  #appengine: To run the tour locally, you'll need to first
    69  #appengine: [[/doc/install][install Go]] and then run:
    70  #appengine:
    71  #appengine:   go install golang.org/x/website/tour@latest
    72  #appengine:
    73  #appengine: This will place a `tour` binary in your
    74  #appengine: [[/cmd/go/#hdr-GOPATH_and_Modules][GOPATH]]'s `bin` directory.
    75  #appengine: When you run the tour program, it will open a web browser displaying
    76  #appengine: your local version of the tour.
    77  #appengine:
    78  #appengine: Of course, you can continue to take the tour through this web site.
    79  
    80  #appengine: * The Go Playground
    81  #appengine:
    82  #appengine: This tour is built atop the [[https://play.golang.org/][Go Playground]], a
    83  #appengine: web service that runs on [[/][golang.org]]'s servers.
    84  #appengine:
    85  #appengine: The service receives a Go program, compiles, links, and runs the program inside
    86  #appengine: a sandbox, then returns the output.
    87  #appengine:
    88  #appengine: There are limitations to the programs that can be run in the playground:
    89  #appengine:
    90  #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.
    91  #appengine:
    92  #appengine: - There are also limits on execution time and on CPU and memory usage, and the program cannot access external network hosts.
    93  #appengine:
    94  #appengine: The playground uses the latest stable release of Go.
    95  #appengine:
    96  #appengine: Read "[[/blog/playground][Inside the Go Playground]]" to learn more.
    97  #appengine:
    98  #appengine: .play welcome/sandbox.go
    99  
   100  * Congratulations
   101  
   102  You've finished the first module of the tour!
   103  
   104  Now click on [[javascript:highlightAndClick(".logo")][A Tour of Go]] to find out what else
   105  you can learn about Go, or go directly to the [[javascript:click('.next-page')][next lesson]].
   106  

View as plain text