Go实操(三):Map使用
1.创建
1 | countryMap = make(map[string]string) |
2.插入
1 | /* map 插入 key-value */ |
3.取值
1 | /* 使用 key 输出 map 值 */ |
4.key是否存在
1 | /* 查看元素在集合中是否存在 */ |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 码农小山!
评论
1 | countryMap = make(map[string]string) |
1 | /* map 插入 key-value */ |
1 | /* 使用 key 输出 map 值 */ |
1 | /* 查看元素在集合中是否存在 */ |