if _, ok := exMap[key]; ok {
fmt.Println("exMap have this key")
}
Golang判断map中key是否存在?
最新推荐文章于 2024-05-24 15:15:21 发布
if _, ok := exMap[key]; ok {
fmt.Println("exMap have this key")
}