Go 关键字之介绍

1、关键字

关键字即是被 Go 赋予了特殊含义的单词。

Go 一共有 25 个关键字:

1
2
3
4
5
break        default      func         interface    select
case defer go map struct
chan else goto package switch
const fallthrough if range type
continue for import return var
ROUTEROS

2、保留字

Go 还有 37 个保留字

1
2
3
4
5
6
7
8
9
10
11
12
内建常量:  
true false iota nil
内建类型:
int int8 int16 int32 int64
uint uint8 uint16 uint32 uint64 uintptr
float32 float64
complex128 complex64
bool
byte rune string error
内建函数:
make delete complex panic append copy
close len cap real imag new recover
GO

Go 关键字之介绍
https://flepeng.github.io/021-Go-31-Go-关键字-Go-关键字之介绍/
作者
Lepeng
发布于
2024年12月1日
许可协议