Goland丨基础 - 2. 第一个Go程序
Goland丨基础 - 2. 第一个Go程序
1. 编写第一个go程序
1 | package main |
2. 运行
1 | [root@jeremy golang]# go run hello.go |
3. 编译,还以使用go build命令来生成一个二进制文件:
1 | [root@jeremy golang]# go build hello.go |
1 | package main |
1 | [root@jeremy golang]# go run hello.go |
1 | [root@jeremy golang]# go build hello.go |