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 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 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
- "previous") or
PageUp
to go to the previous page,
"next") or
PageDown
to go to the next page.The tour is interactive. Click the Run) button now (or press
Shift
+Enter
) to compile and run the program on a remote server. 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.
When you click on Format) (shortcut:
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 syntax) button.When you're ready to move on, click the right arrow) below or type the
PageDown
key.
hello.go
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}