GO操作切片数组时不当,数据被覆盖
场景在一个数组对象的 index 索引处插入一个值func (list *ArrayList) Insert(index int, newval interface{}) error {}原有代码func (list *ArrayList) Insert(index int, newval interface{}) error { if index < 0 || index >= list.TheSize { return errors.New("index out of ran
原创
2020-12-17 14:46:39 ·
835 阅读 ·
0 评论