You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
241 B
19 lines
241 B
12 years ago
|
// From go-tour #28
|
||
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type Vertex struct {
|
||
12 years ago
|
Lat, Long float64
|
||
12 years ago
|
}
|
||
|
|
||
|
var m map[string]Vertex
|
||
|
|
||
|
func main() {
|
||
12 years ago
|
m = make(map[string]Vertex)
|
||
|
m["Bell Labs"] = Vertex{
|
||
|
40.68433, 74.39967,
|
||
|
}
|
||
|
fmt.Println(m["Bell Labs"])
|
||
12 years ago
|
}
|