Golang first go program

Time:2021-11-30

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

useGolandCreate ahello_go.goFile (suffix:.go)2. The content of the document is

package main

import "fmt"

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

stayGolandUsing shortcut keys inCtrl + Shift + F10Run the program and the results are as follows:

image

Perfect! Now you have learned how to run a go program

Li peiguan blog

lpgit.com

Recommended Today

Game case | application evolution and practice of service mesh in happy games

author Chen Zhiwei, Tencent level 12 background expert engineer, is now responsible for the public background technology research and development and team management of happy game studio. Rich experience in micro service distributed architecture and game background operation and maintenance research and development. preface The background of happy game studio is a distributed micro service […]