go切片删除一个值,得到一个新值

func ResearchDel(s []string, p string) []string {
for in := 0; in < len(s); in++ {
if s[in] == p {
s = append(s[:in], s[in+1:]...)
in--
}
}
return s
}
原文地址:https://www.cnblogs.com/cheyunhua/p/15670571.html