From 42b7abccc07be0af91856eb3b0d79cab94d64d86 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Fri, 30 Nov 2012 19:31:24 -0500 Subject: [PATCH] Re-namespacing stuff, but not quite going the whole way with "correct" go layout since I don't really want the overhead of separate repos for silly crap like this. --- gotime/.example-autoenv.env | 11 +++++---- gotime/Makefile | 24 ++++++++----------- .../amqpfun-runner/main.go | 2 +- .../amqpfun/workers.go | 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 .../junkdrawer/greppish/main.go | 0 17 files changed, 18 insertions(+), 19 deletions(-) rename gotime/src/{meatballhat.com => gotime.example.org}/amqpfun-runner/main.go (90%) rename gotime/src/{meatballhat.com => gotime.example.org}/amqpfun/workers.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/buffered-channels/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/channels/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-fibonacci-closure/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-http-handlers/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-maps/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-rot13-reader/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-slices/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/exercise-sqrt/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/goroutines/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/hello-web/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/maps/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/gotour-artifacts/ranges/main.go (100%) rename gotime/src/{meatballhat.com => gotime.example.org}/junkdrawer/greppish/main.go (100%) diff --git a/gotime/.example-autoenv.env b/gotime/.example-autoenv.env index cf54d12..9d3633d 100644 --- a/gotime/.example-autoenv.env +++ b/gotime/.example-autoenv.env @@ -1,4 +1,7 @@ -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="$GOROOT:$HOME/src/box-o-sand/src/gotime" -source "$GOROOT/misc/bash/go" +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 8bd8054..832f80e 100644 --- a/gotime/Makefile +++ b/gotime/Makefile @@ -1,36 +1,32 @@ CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":") GOPATH := $(PWD):$(CLEAN_GOPATH) PACKAGES := $(foreach pkg,\ - $(shell ls src/meatballhat.com/gotour-artifacts),\ - $(patsubst %,meatballhat.com/gotour-artifacts/%,$(pkg))\ + $(shell ls src/gotime.example.org/gotour-artifacts),\ + $(patsubst %,gotime.example.org/gotour-artifacts/%,$(pkg))\ ) PACKAGES += $(foreach pkg,\ - $(shell ls src/meatballhat.com/junkdrawer),\ - $(patsubst %,meatballhat.com/junkdrawer/%,$(pkg))\ + $(shell ls src/gotime.example.org/junkdrawer),\ + $(patsubst %,gotime.example.org/junkdrawer/%,$(pkg))\ ) -PACKAGES += meatballhat.com/amqpfun-runner +PACKAGES += gotime.example.org/amqpfun-runner test: build - go test $(PACKAGES) + go test -x -v $(PACKAGES) build: deps - go install $(PACKAGES) + go install -x $(PACKAGES) fmt: - go fmt $(PACKAGES) + go fmt -x $(PACKAGES) deps: - go get $(PACKAGES) + go get -x $(PACKAGES) clean: rm -v bin/* -publish: - rsync -avz src/meatballhat.com/gotour-artifacts mbh:meatballhat.com/docroot/ - ssh mbh "find meatballhat.com/docroot/gotour-artifacts -type d -exec chmod 755 {} \; && find meatballhat.com/docroot/gotour-artifacts/ -type f -exec chmod 644 {} \;" - env: @echo GOPATH=$(GOPATH) @echo PACKAGES=$(PACKAGES) -.PHONY: test build clean publish env fmt +.PHONY: test build clean env fmt diff --git a/gotime/src/meatballhat.com/amqpfun-runner/main.go b/gotime/src/gotime.example.org/amqpfun-runner/main.go similarity index 90% rename from gotime/src/meatballhat.com/amqpfun-runner/main.go rename to gotime/src/gotime.example.org/amqpfun-runner/main.go index 6bbd0a2..4908378 100644 --- a/gotime/src/meatballhat.com/amqpfun-runner/main.go +++ b/gotime/src/gotime.example.org/amqpfun-runner/main.go @@ -6,7 +6,7 @@ import ( ) import ( - "meatballhat.com/amqpfun" + "gotime.example.org/amqpfun" ) const USAGE = "Usage: amqpfun-runner (publish|consume)" diff --git a/gotime/src/meatballhat.com/amqpfun/workers.go b/gotime/src/gotime.example.org/amqpfun/workers.go similarity index 100% rename from gotime/src/meatballhat.com/amqpfun/workers.go rename to gotime/src/gotime.example.org/amqpfun/workers.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/buffered-channels/main.go b/gotime/src/gotime.example.org/gotour-artifacts/buffered-channels/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/buffered-channels/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/buffered-channels/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/channels/main.go b/gotime/src/gotime.example.org/gotour-artifacts/channels/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/channels/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/channels/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-fibonacci-closure/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-fibonacci-closure/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-fibonacci-closure/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-fibonacci-closure/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-http-handlers/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-http-handlers/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-http-handlers/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-http-handlers/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-maps/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-maps/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-maps/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-maps/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-rot13-reader/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-rot13-reader/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-rot13-reader/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-rot13-reader/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-slices/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-slices/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-slices/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-slices/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/exercise-sqrt/main.go b/gotime/src/gotime.example.org/gotour-artifacts/exercise-sqrt/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/exercise-sqrt/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/exercise-sqrt/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/goroutines/main.go b/gotime/src/gotime.example.org/gotour-artifacts/goroutines/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/goroutines/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/goroutines/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/hello-web/main.go b/gotime/src/gotime.example.org/gotour-artifacts/hello-web/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/hello-web/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/hello-web/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/maps/main.go b/gotime/src/gotime.example.org/gotour-artifacts/maps/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/maps/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/maps/main.go diff --git a/gotime/src/meatballhat.com/gotour-artifacts/ranges/main.go b/gotime/src/gotime.example.org/gotour-artifacts/ranges/main.go similarity index 100% rename from gotime/src/meatballhat.com/gotour-artifacts/ranges/main.go rename to gotime/src/gotime.example.org/gotour-artifacts/ranges/main.go diff --git a/gotime/src/meatballhat.com/junkdrawer/greppish/main.go b/gotime/src/gotime.example.org/junkdrawer/greppish/main.go similarity index 100% rename from gotime/src/meatballhat.com/junkdrawer/greppish/main.go rename to gotime/src/gotime.example.org/junkdrawer/greppish/main.go