学习A Tour of Go中的一个MAP例子,如下:

package main


import "fmt"


type Vertex struct {
Lat, Long float64
}


var m = map[string]Vertex{
"Bell Labs": {40.68433, -74.39967},
"Google":    {37.42202, -122.08408},
}


func main() {
fmt.Println(m)
}
为啥多次执行的结果不一样呢?

D:\myroot\temp\golang\bin>go install example\hello


D:\myroot\temp\golang\bin>hello.exe
map[Bell Labs:{40.68433 -74.39967} Google:{37.42202 -122.08408}]


D:\myroot\temp\golang\bin>hello.exe
map[Google:{37.42202 -122.08408} Bell Labs:{40.68433 -74.39967}]


D:\myroot\temp\golang\bin>hello.exe
map[Bell Labs:{40.68433 -74.39967} Google:{37.42202 -122.08408}]


D:\myroot\temp\golang\bin>hello.exe
map[Google:{37.42202 -122.08408} Bell Labs:{40.68433 -74.39967}]


D:\myroot\temp\golang\bin>