Day2中的Sublimt Text搭建环境放弃了,使用GoLong的IDE环境,安装破解重置
从今天开始正式进入核心学习部分
基本结构和基本数据类型
程序一般由关键字、常量、变量、运算符、类型和函数组成。
Go中的关键字
| 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 |
36个预定义标识符(包含基本类型的名称和一些基本的内置函数)
| append | bool | byte | cap | close | complex | complex64 | complex128 | uint16 |
| copy | false | float32 | float64 | imag | int | int8 | int16 | uint32 |
| int32 | int64 | iota | len | make | new | nil | panic | uint64 |
| println | real | recover | string | true | uint | uint8 | uintptr |
程序的代码通过语句来实现结构化。每个语句不需要像 C 中的其它语言一样以分号 ; 结尾
main 函数既没有参数,也没有返回类型
本文介绍了如何在GoLong IDE环境中开始学习Go语言,涉及关键字、数据类型、语句结构,以及main函数的基本理解。重点讲解了36个预定义标识符和程序结构,包括break到var等关键字。

被折叠的 条评论
为什么被折叠?



