//===> 第一种声明方式
//key是string, value是string
var myMap1 map[string]string
//在使用map前, 需要先用make给map分配数据空间
myMap1 = make(map[string]string, 10)
myMap1["one"] = "java"
myMap1["two"] = "c++"
myMap1["three"] = "python"
//===> 第二种声明方式
myMap2 := make(map[int]string)
myMap3 := map[string]string{
"one": "php",
"two": "c++",
"three": "python",
}
Map是动态增长的,不需要预设元素个数,因此make的