From 44999623da8d057d8eeaf4c8724219d58036767c Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 13 Dec 2012 18:12:43 -0500 Subject: [PATCH] Collapsing tree into more sane Go project layout since I was in here looking at something unrelated... --- gotime/.example-autoenv.env | 7 --- gotime/Makefile | 45 +++++++++---------- .../amqpfun-runner/main.go | 2 +- .../amqpfun/workers.go | 0 gotime/bin/.gitkeep | 0 .../buffered-channels/main.go | 0 .../gotour-artifacts/channels/main.go | 0 .../exercise-fibonacci-closure/main.go | 0 .../exercise-http-handlers/main.go | 0 .../gotour-artifacts/exercise-maps/main.go | 0 .../exercise-rot13-reader/main.go | 0 .../gotour-artifacts/exercise-slices/main.go | 0 .../gotour-artifacts/exercise-sqrt/main.go | 0 .../gotour-artifacts/goroutines/main.go | 0 .../gotour-artifacts/hello-web/main.go | 0 .../gotour-artifacts/maps/main.go | 0 .../gotour-artifacts/ranges/main.go | 0 .../gotour-artifacts/selects/main.go | 0 .../junkdrawer/greppish/main.go | 0 19 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 gotime/.example-autoenv.env rename gotime/{src/gotime.example.org => }/amqpfun-runner/main.go (84%) rename gotime/{src/gotime.example.org => }/amqpfun/workers.go (100%) delete mode 100644 gotime/bin/.gitkeep rename gotime/{src/gotime.example.org => }/gotour-artifacts/buffered-channels/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/channels/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-fibonacci-closure/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-http-handlers/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-maps/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-rot13-reader/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-slices/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/exercise-sqrt/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/goroutines/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/hello-web/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/maps/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/ranges/main.go (100%) rename gotime/{src/gotime.example.org => }/gotour-artifacts/selects/main.go (100%) rename gotime/{src/gotime.example.org => }/junkdrawer/greppish/main.go (100%) diff --git a/gotime/.example-autoenv.env b/gotime/.example-autoenv.env deleted file mode 100644 index 9d3633d..0000000 --- a/gotime/.example-autoenv.env +++ /dev/null @@ -1,7 +0,0 @@ -if [ -z "$_GOTIME_DID_SETUP" ] ; then - export PATH="$HOME/src/box-o-sand/src/gotime/.installation/go/bin:$PATH" - export GOROOT="$HOME/src/box-o-sand/src/gotime/.installation/go" - export GOPATH="$HOME/src/box-o-sand/src/gotime:$GOROOT" - source "$GOROOT/misc/bash/go" - export _GOTIME_DID_SETUP=1 -fi diff --git a/gotime/Makefile b/gotime/Makefile index 832f80e..7189d6a 100644 --- a/gotime/Makefile +++ b/gotime/Makefile @@ -1,32 +1,31 @@ -CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":") -GOPATH := $(PWD):$(CLEAN_GOPATH) -PACKAGES := $(foreach pkg,\ - $(shell ls src/gotime.example.org/gotour-artifacts),\ - $(patsubst %,gotime.example.org/gotour-artifacts/%,$(pkg))\ - ) -PACKAGES += $(foreach pkg,\ - $(shell ls src/gotime.example.org/junkdrawer),\ - $(patsubst %,gotime.example.org/junkdrawer/%,$(pkg))\ - ) -PACKAGES += gotime.example.org/amqpfun-runner +TARGETS = \ + github.com/meatballhat/box-o-sand/gotime/amqpfun \ + github.com/meatballhat/box-o-sand/gotime/amqpfun-runner \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/buffered-channels \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/channels \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-fibonacci-closure \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-http-handlers \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-maps \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-rot13-reader \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-slices \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/exercise-sqrt \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/goroutines \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/hello-web \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/maps \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/ranges \ + github.com/meatballhat/box-o-sand/gotime/gotour-artifacts/selects \ + github.com/meatballhat/box-o-sand/gotime/junkdrawer/greppish test: build - go test -x -v $(PACKAGES) + go test -x -v $(TARGETS) build: deps - go install -x $(PACKAGES) - -fmt: - go fmt -x $(PACKAGES) + go install -x $(TARGETS) deps: - go get -x $(PACKAGES) + go get -n -x $(TARGETS) clean: - rm -v bin/* - -env: - @echo GOPATH=$(GOPATH) - @echo PACKAGES=$(PACKAGES) + go clean -x -i $(TARGETS) -.PHONY: test build clean env fmt +.PHONY: test build clean fmt diff --git a/gotime/src/gotime.example.org/amqpfun-runner/main.go b/gotime/amqpfun-runner/main.go similarity index 84% rename from gotime/src/gotime.example.org/amqpfun-runner/main.go rename to gotime/amqpfun-runner/main.go index 4908378..92255cd 100644 --- a/gotime/src/gotime.example.org/amqpfun-runner/main.go +++ b/gotime/amqpfun-runner/main.go @@ -6,7 +6,7 @@ import ( ) import ( - "gotime.example.org/amqpfun" + "github.com/meatballhat/box-o-sand/gotime/amqpfun" ) const USAGE = "Usage: amqpfun-runner (publish|consume)" diff --git a/gotime/src/gotime.example.org/amqpfun/workers.go b/gotime/amqpfun/workers.go similarity index 100% rename from gotime/src/gotime.example.org/amqpfun/workers.go rename to gotime/amqpfun/workers.go diff --git a/gotime/bin/.gitkeep b/gotime/bin/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/gotime/src/gotime.example.org/gotour-artifacts/buffered-channels/main.go b/gotime/gotour-artifacts/buffered-channels/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/buffered-channels/main.go rename to gotime/gotour-artifacts/buffered-channels/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/channels/main.go b/gotime/gotour-artifacts/channels/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/channels/main.go rename to gotime/gotour-artifacts/channels/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-fibonacci-closure/main.go b/gotime/gotour-artifacts/exercise-fibonacci-closure/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-fibonacci-closure/main.go rename to gotime/gotour-artifacts/exercise-fibonacci-closure/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-http-handlers/main.go b/gotime/gotour-artifacts/exercise-http-handlers/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-http-handlers/main.go rename to gotime/gotour-artifacts/exercise-http-handlers/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-maps/main.go b/gotime/gotour-artifacts/exercise-maps/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-maps/main.go rename to gotime/gotour-artifacts/exercise-maps/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-rot13-reader/main.go b/gotime/gotour-artifacts/exercise-rot13-reader/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-rot13-reader/main.go rename to gotime/gotour-artifacts/exercise-rot13-reader/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-slices/main.go b/gotime/gotour-artifacts/exercise-slices/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-slices/main.go rename to gotime/gotour-artifacts/exercise-slices/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/exercise-sqrt/main.go b/gotime/gotour-artifacts/exercise-sqrt/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/exercise-sqrt/main.go rename to gotime/gotour-artifacts/exercise-sqrt/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/goroutines/main.go b/gotime/gotour-artifacts/goroutines/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/goroutines/main.go rename to gotime/gotour-artifacts/goroutines/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/hello-web/main.go b/gotime/gotour-artifacts/hello-web/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/hello-web/main.go rename to gotime/gotour-artifacts/hello-web/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/maps/main.go b/gotime/gotour-artifacts/maps/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/maps/main.go rename to gotime/gotour-artifacts/maps/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/ranges/main.go b/gotime/gotour-artifacts/ranges/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/ranges/main.go rename to gotime/gotour-artifacts/ranges/main.go diff --git a/gotime/src/gotime.example.org/gotour-artifacts/selects/main.go b/gotime/gotour-artifacts/selects/main.go similarity index 100% rename from gotime/src/gotime.example.org/gotour-artifacts/selects/main.go rename to gotime/gotour-artifacts/selects/main.go diff --git a/gotime/src/gotime.example.org/junkdrawer/greppish/main.go b/gotime/junkdrawer/greppish/main.go similarity index 100% rename from gotime/src/gotime.example.org/junkdrawer/greppish/main.go rename to gotime/junkdrawer/greppish/main.go