func IsContain(items []string, item string) bool {
for _, eachItem := range items {
if eachItem == item {
return true
}
}
return false
}
Golang判断元素是否存在数组中
猜你喜欢
转载自blog.csdn.net/weixin_43874301/article/details/120454500
今日推荐
周排行