关键字、标识符
- 关键字
- 预定义标识符
25个关键字
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
default | break | return | goto | for |
continue | var | const | map | func |
go | select | type | struct | interface |
range | import | package | defer | chan |
fallthrough | if | else | switch | case |
内建常量
1 | 2 | 3 | 4 |
---|---|---|---|
true | false | iota | nil |
内建类型
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
int | int8 | int16 | int32 | int64 |
uint | uint8 | uint16 | uint32 | uint64 |
float32 | float64 | uintptr | ||
complex64 | complex128 | |||
bool | byte | rune | string | error |
内建函数
1 | 2 | 3 | 4 |
---|---|---|---|
make | len | cap | new |
copy | delete | real | imag |
recover | complex | append | panic |