执行Go程序的三种方式及Go语言关键字
执行 Go 程序的三种方式及 Go 语言关键字
执行 Go 程序的三种方式
一、使用 go run
命令
二、使用 go build
命令
Step1. 对 go 源码源文件执行 go build
命令,会生成一个同名 .exe的可执行文件
Step2. 执行.exe可执行文件
三、在线编译运行
Go 语言中的关键字
Go 语言关键字
|
|
|
break |
default |
func |
case |
defer |
go |
chan |
else |
goto |
const |
fallthrough |
if |
continue |
for |
import |
除了以上的关键字,Go 语言还有36个预定义标识符
|
|
|
|
|
|
|
append |
bool |
byte |
cap |
close |
complex |
complex64 |
copy |
false |
float32 |
float64 |
imag |
int |
int8 |
int32 |
int64 |
iota |
len |
make |
new |
nil |
print |
println |
real |
recover |
string |
true |
uint |
原文地址:https://www.cnblogs.com/muyisir/p/9321319.html