mySlice = make([]int, 100)
mySlice[3:5] = {3,4,5}
this gives me error
评论:
nsd433:
You probably want to use copy. As in
copy(mySlice[3:5], []int{3,4,5})

mySlice = make([]int, 100)
mySlice[3:5] = {3,4,5}
this gives me error
You probably want to use copy. As in
copy(mySlice[3:5], []int{3,4,5})
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
`单行代码`