delete some elements from the head of slice without new memory


    • a = []int{1, 2, 3}
    • a = append(a[:0], a[1:]...) // 删除开头1个元素
    • a = append(a[:0], a[N:]...) // 删除开头N个元素
原文地址:https://www.cnblogs.com/qiaoyanlin/p/12005238.html