GOWEB编程——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
  • func 用于定义函数和方法
  • return 用于从函数返回
  • defer 用于类似析构函数
  • go 用于并发
  • select 用于选择不同类型的通讯
  • interface 用于定义接口
  • struct 用于定义抽象数据类型
  • break、case、continue、for、fallthrough、else、if、switch、goto、default
  • chan 用于 channel 通讯
  • type 用于声明自定义类型
  • map 用于声明 map 类型数据
  • range 用于读取 slice、map、channel 数据
posted @ 2021-05-09 21:48  Gumi-21  阅读(50)  评论(0)    收藏  举报