创建切片时可以指定容量,其中capacity为可选参数:make([]T, length, capacity)。
package main import "fmt" func main() { var numbers = make([]int,3,5) fmt.Printf("%T\n" , numbers) fmt.Printf("len=