命名规定
Go语言中函数名、变量名、常量名、类型名、语句标号和包名等所有的命名,都遵循一个简略的命名规定:一个名字必须以一个字母(Unicode字母)或是下划线结尾,前面能够跟任意数量的字母、数字和下划线。大小写字母是不同的:SortString 和 sortString 是两个不同的名字。
关键字
Go的关键字有25个:
breack default func interface select case defer go map struct chanelse goto package switch const fallthrough if range type continue for import return var
预约义名字
内建常量:true false iota nil内建类型: int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr内建函数:make len cap new append copy close delete complex rel imag panic recover