关键字、保留字

​ Go目前有25个关键字。

​ 来源:https://go.dev/ref/spec#Keywords

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
最后修改 August 19, 2024: 更新 (197c9f2)