golang判断key是否在map中

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

  

posted @ 2019-09-21 14:05  golang-jack  阅读(9703)  评论(0)    收藏  举报