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
  1. var和const参考2.2Go语言基础里面的变量和常量申明
  2. package和import已经有过短暂的接触
  3. func 用于定义函数和方法
  4. return 用于从函数返回
  5. defer 用于类似析构函数
  6. go 用于并发
  7. select 用于选择不同类型的通讯
  8. interface 用于定义接口,参考2.6小节
  9. struct 用于定义抽象数据类型,参考2.5小节
  10. break、case、continue、for、fallthrough、else、if、switch、goto、default这些参考2.3流程介绍里面
  11. chan用于channel通讯
  12. type用于声明自定义类型
  13. map用于声明map类型数据
  14. range用于读取slice、map、channel数据