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

1
gotime/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin/

12
gotime/Makefile Normal file
View File

@ -0,0 +1,12 @@
SOURCES := $(shell find src -name '*.go')
TARGETS := $(patsubst src/%.go,bin/%,$(SOURCES))
bin/%: src/%.go
go build -o $@ $^
all: $(TARGETS)
clean:
rm -v bin/*
.PHONY: all clean

0
gotime/bin/.gitkeep Normal file
View File

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"])
}