Home>Article>Backend Development> How to run go language program

How to run go language program

王林
王林 Original
2021-02-04 14:25:46 22087browse

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.

How to run go language program

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!

How to run go language program

Save it as a print.go file

Then CMD the next path and cd to the print.go directory

How to run go language program

Run go run print.go under cmd to run the go program

How to run go language program

Look at the running results

How to run go language program

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn