摘要: 一、源码 //go1.15.6 源码 src/runtime/slice.go func growslice(et *_type, old slice, cap int) slice { //省略部分判断代码 //计算扩容部分 //其中,cap : 所需容量,newcap : 最终申请容量 newc 阅读全文
posted @ 2021-09-26 18:14 蓝宇之鹏 阅读(150) 评论(0) 推荐(0)