Recording some of my work as I go through the go-tour

This commit is contained in:
Dan Buch
2012-08-25 21:08:08 -04:00
parent 4618fcf851
commit dd64e484a5
4 changed files with 31 additions and 0 deletions

18
gotime/src/maps.go Normal file
View File

@@ -0,0 +1,18 @@
// From go-tour #28
package main
import "fmt"
type Vertex struct {
Lat, Long float64
}
var m map[string]Vertex
func main() {
m = make(map[string]Vertex)
m["Bell Labs"] = Vertex{
40.68433, 74.39967,
}
fmt.Println(m["Bell Labs"])
}