golang判断map的key是否存在

if _, ok := map[key]; ok {
  //存在
}

posted @ 2021-07-30 09:18  程序员小艺  阅读(98)  评论(0)    收藏  举报