Go语言有25个关键词。它们只能在语法允许的场合使用,不能被用户自定义的变量或者函数名覆盖。它们如下所示。 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 另外与Python类似,Go也有三类预声明的名字,可以被用户自定义的变量名、函数名覆盖。它们如下所示。 预声明常量: true false iota