Go语言的变量类型有:
-
基本类型
-
整型,包括int,uint,int8,uint8,int16,uint16,int32,uint32,int64,uint64,byte (uint8 的别名),rune (int32 的别名 代表一个 Unicode 码),uintptr等
-
浮点型,包括float32,float64
-
复数类型,包括complex64,complex128
-
字符串类型,string
-
布尔型,bool
-
-
复合类型
-
数组
-
struct结构体
-
-
引用类型
-
slice
-
map
-
channel
-
pointer or 引用类型
-
-
接口类型
- io.Reader, io.Writer,error等