months := [...]string{"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"}
q2 := months[3:6]
fmt.Println(cap(q2)) //9
不太明白数组切片的这个容量问题 请指教
有疑问加站长微信联系(非本文作者)

months := [...]string{"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"}
q2 := months[3:6]
fmt.Println(cap(q2)) //9
不太明白数组切片的这个容量问题 请指教
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
`单行代码`