From 597f07ec2fc364a4ea329d3a1029ad3c105f1531 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 6 Nov 2012 23:01:10 -0500 Subject: [PATCH] Stubbing in new Go project for playing more with AMQP and database stuff --- sylvilagus/.example-autoenv.env | 2 ++ sylvilagus/.gitignore | 3 +++ sylvilagus/Makefile | 27 +++++++++++++++++++ sylvilagus/bin/.gitkeep | 0 .../src/meatballhat.com/sylvilagus/main.go | 14 ++++++++++ 5 files changed, 46 insertions(+) create mode 100644 sylvilagus/.example-autoenv.env create mode 100644 sylvilagus/.gitignore create mode 100644 sylvilagus/Makefile create mode 100644 sylvilagus/bin/.gitkeep create mode 100644 sylvilagus/src/meatballhat.com/sylvilagus/main.go diff --git a/sylvilagus/.example-autoenv.env b/sylvilagus/.example-autoenv.env new file mode 100644 index 0000000..8a69eea --- /dev/null +++ b/sylvilagus/.example-autoenv.env @@ -0,0 +1,2 @@ +export GOPATH="$GOROOT:$HOME/src/box-o-sand/src/sylvilagus" +test -n "$GOROOT" && source "$GOROOT/misc/bash/go" diff --git a/sylvilagus/.gitignore b/sylvilagus/.gitignore new file mode 100644 index 0000000..af7d0c0 --- /dev/null +++ b/sylvilagus/.gitignore @@ -0,0 +1,3 @@ +/bin/* +/.env +/src/github.com/ diff --git a/sylvilagus/Makefile b/sylvilagus/Makefile new file mode 100644 index 0000000..77aea37 --- /dev/null +++ b/sylvilagus/Makefile @@ -0,0 +1,27 @@ +CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":") +GOPATH := $(PWD):$(CLEAN_GOPATH) +PACKAGES := meatballhat.com/sylvilagus + +export GOPATH + + +test: build + go test $(PACKAGES) + +build: deps fmt + go install $(PACKAGES) + +deps: + go list -f '{{range .Imports}}{{.}} {{end}}' $(PACKAGES) | xargs go get + +fmt: + go fmt $(PACKAGES) + +clean: + rm -v bin/* + +env: + @echo GOPATH=$(GOPATH) + @echo PACKAGES=$(PACKAGES) + +.PHONY: all clean env fmt diff --git a/sylvilagus/bin/.gitkeep b/sylvilagus/bin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sylvilagus/src/meatballhat.com/sylvilagus/main.go b/sylvilagus/src/meatballhat.com/sylvilagus/main.go new file mode 100644 index 0000000..dcac941 --- /dev/null +++ b/sylvilagus/src/meatballhat.com/sylvilagus/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" +) + +import ( + "github.com/streadway/amqp" +) + +func main() { + amqp.Dial("") + fmt.Println("YES GO!") +}