golang相关
go test 介绍 https://geektutu.com/post/quick-go-test.html https://pkg.go.dev/testing go modules 依赖管理 https://blog.golang.org/using-go-modules slice go中数组的赋值和函数传参都是值传递。 切片是对数组的一个连续片段的引用。 1 2 3 4 5 type slice struct { len int cap int // cap >= len array unsafe.Pointer //指向数组的指针 } 扩容 首先判断,如果新申请容量(cap)大于2倍的旧容量(old.cap),最终容量(newcap)就是新申请的容量(cap……