Go中使用切片的容量和长度的技巧 发表于 2018-05-02 | 分类于 软件之路 | | 使用make建立切片 1make([]string, 0, len(m)) 使用append可以扩展切片的cap(2、4、8……的方式) 资料Go中使用切片的容量和长度的技巧