数组1.数组 01.切片基础 1.1 Array介绍 数组是指一系列同一类型数据的集合。 数组中包含的每个数据被称为数组元素(element),这种类型可以是任意的原始类型,比如 int、string 等 一个数组包含的元素个数被称为数组的长度。 在 Golang 中数组是一个长度固定的数据类型,数组的长度是类型的一部分,也就是说 [5]int 和 [10]int 是两个不同的类型。 Golang中 2021-01-07 Go基础 #Go基础
基本数据类型1.基本数据类型 01.内置类型 1.1 值类型: bool int(32 or 64), int8, int16, int32, int64 uint(32 or 64), uint8(byte), uint16, uint32, uint64 float32, float64 string complex64, complex128 array // 固定长度的数组 1.2 引用类型:( 2021-01-07 Go基础 #Go基础