2.2 Go变量类型

内置类型 值类型:

bool                                                        布尔类型
int(32 or 64), int8, int16, int32, int64                    整数类型
uint(32 or 64), uint8(byte), uint16, uint32, uint64            无符号整型
float32, float64                                            浮点型
string                                                        string
array                                                       固定长度的数组
struct                                                        结构体

引用类型:(指针类型)

slice       切片
map         映射
chan        管道
interface    接口

猜你喜欢

转载自www.cnblogs.com/open-yang/p/11256701.html
2.2