How to run go language program

王林
Release: 2023-01-13 00:21:42
Original
22262 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template