第一种:

var numbers map[string]intnumbers = make(map[string]int)
var numbers map[string]int
numbers = make(map[string]int)
numbers["one"] = 1  //赋值
numbers["ten"] = 10 //赋值
fmt.Println(numbers)

另一种:

number := make(map[string]int)
number := make(map[string]int)
number["two"] = 2  //赋值
number["five"] = 5 //赋值
fmt.Println(number)