golang中删除切片中的元素

func main() {
    a := []string{"Hello1", "Hello2", "Hello3"}
    fmt.Println(a)  // [Hello1 Hello2 Hello3]
    
    a = append(a[:0], a[1:]...)
    fmt.Println(a)  // [Hello2 Hello3]
}
原文地址:https://www.cnblogs.com/shuchengyi/p/11401838.html