Re-namespacing everything and fixing imports to match

This commit is contained in:
Dan Buch 2012-12-19 21:10:56 -05:00
parent 335fe2e9bd
commit 76c392967d
13 changed files with 19 additions and 18 deletions

View File

@ -1,23 +1,24 @@
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),\
$(patsubst %,meatballhat.com/%,$(pkg))\
)
REPO_BASE := github.com/meatballhat/box-o-sand/algs4/go
TARGETS := \
$(REPO_BASE)/algs4 \
$(REPO_BASE)/algs4-binarysearch \
$(REPO_BASE)/algs4-flips \
$(REPO_BASE)/algs4-gcd \
$(REPO_BASE)/algs4-rolls
test: build
go test $(PACKAGES)
go test -x $(TARGETS)
build: deps
go install $(PACKAGES)
go install -x $(TARGETS)
fmt:
go fmt $(PACKAGES)
go fmt -x $(TARGETS)
deps:
go get $(PACKAGES)
go get -x -n $(TARGETS)
clean:
rm -v bin/*
go clean -x -x $(TARGETS)
.PHONY: test build clean fmt

View File

@ -8,7 +8,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
const USAGE string = `Usage: algs4-binarysearch <whitelist-file>

View File

@ -10,7 +10,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
const USAGE string = "Usage: algs4-flips <nflips>"

View File

@ -7,7 +7,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
const USAGE string = `Usage: algs4-gcd <uint> <uint>`

View File

@ -7,7 +7,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
const (

View File

@ -5,7 +5,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
func TestBinarySearchRank(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
func TestGcd(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
)
import (
"meatballhat.com/algs4"
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
)
const INTS_STRING = `