Go的数据类型

101 阅读1分钟

Go数据类型分为四类:

  • basic type number string boolean

  • aggregate type array struct 由各种简单类型得到更复杂的数据类型

  • reference type pointer slice map function 间接指向程序变量或状态,操作所引用数据的效果会遍及该数据的全部引用

  • interface type interface