How to run the go language program: 1. Create a new file with go as the suffix and write the program code; 2. Save the file, open the command prompt, and enter the directory where the new file is located; 3. Run [go run print.go] command can be used.
The operating environment of this article: windows10 system, Go 1.11.2, thinkpad t480 computer.
Let’s write a piece of GO code first
It’s very simple to print out a hello world!
Save it as a print.go file
Then CMD the next path and cd to the print.go directory
Run go run print.go under cmd to run the go program
Look at the running results
Related recommendations: golang tutorial
The above is the detailed content of How to run go language program. For more information, please follow other related articles on the PHP Chinese website!