In this section, let’s learn to write the simplest Go program: print Hello go
The first go program, just follow it and leave an impression
useGoland
Create ahello_go.go
File (suffix:.go
)2. The content of the document is
package main
import "fmt"
func main() {
fmt.Println("Hello Go")
}
stayGoland
Using shortcut keys inCtrl + Shift + F10
Run the program and the results are as follows:
Perfect! Now you have learned how to run a go program
Li peiguan blog
lpgit.com