go append的坑
摘要:
b := []int{1,2,3,4,5} slice := b[:2] newSlice := append(slice, 50) fmt.Println(b) fmt.Println(newSlice) 打印: [1 2 50 4 5] [1 2 50] append 底层源码实现如果发现切片指 阅读全文
posted @ 2021-01-06 17:56 biwentao 阅读(168) 评论(0) 推荐(0)
浙公网安备 33010602011771号