golang判断map的key是否存在

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

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