Featured image of post Go

Go

Config

Proxy

1
go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct

Tips

切片会导致整个底层数组不能被回收

解决办法是创建新的切片

1
slice = append([]T{}, slice[1:]...)
Licensed under CC BY-NC-SA 4.0