"Go foundation" Section 5 first Go program

In this section we learn to write a simple Go program: print Hello Go.

第一个Go程序, 只要跟着做, 留下个印象就可以.

By Golandcreating a hello_go.gofile (suffix .go). Contents of the documents

package main

import "fmt"

func main() {
    fmt.Println("Hello Go")
}

Use the shortcut key Ctrl + Shift + F10to run the program, results are as follows:

img

Perfect! Now that you've learned how to run a program of Go.

Guess you like

Origin www.cnblogs.com/BlameKidd/p/11620181.html