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

cat-town
Dan Buch 12 years ago
parent 4618fcf851
commit dd64e484a5

1
gotime/.gitignore vendored

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

@ -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,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"])
}
Loading…
Cancel
Save