Re-namespacing everything and fixing imports to match
This commit is contained in:
parent
335fe2e9bd
commit
76c392967d
@ -1,23 +1,24 @@
|
|||||||
CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":")
|
REPO_BASE := github.com/meatballhat/box-o-sand/algs4/go
|
||||||
GOPATH := $(PWD):$(CLEAN_GOPATH)
|
TARGETS := \
|
||||||
PACKAGES := $(foreach pkg,\
|
$(REPO_BASE)/algs4 \
|
||||||
$(shell ls src/meatballhat.com),\
|
$(REPO_BASE)/algs4-binarysearch \
|
||||||
$(patsubst %,meatballhat.com/%,$(pkg))\
|
$(REPO_BASE)/algs4-flips \
|
||||||
)
|
$(REPO_BASE)/algs4-gcd \
|
||||||
|
$(REPO_BASE)/algs4-rolls
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
go test $(PACKAGES)
|
go test -x $(TARGETS)
|
||||||
|
|
||||||
build: deps
|
build: deps
|
||||||
go install $(PACKAGES)
|
go install -x $(TARGETS)
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
go fmt $(PACKAGES)
|
go fmt -x $(TARGETS)
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get $(PACKAGES)
|
go get -x -n $(TARGETS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -v bin/*
|
go clean -x -x $(TARGETS)
|
||||||
|
|
||||||
.PHONY: test build clean fmt
|
.PHONY: test build clean fmt
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
const USAGE string = `Usage: algs4-binarysearch <whitelist-file>
|
const USAGE string = `Usage: algs4-binarysearch <whitelist-file>
|
@ -10,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
const USAGE string = "Usage: algs4-flips <nflips>"
|
const USAGE string = "Usage: algs4-flips <nflips>"
|
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
const USAGE string = `Usage: algs4-gcd <uint> <uint>`
|
const USAGE string = `Usage: algs4-gcd <uint> <uint>`
|
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBinarySearchRank(t *testing.T) {
|
func TestBinarySearchRank(t *testing.T) {
|
@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGcd(t *testing.T) {
|
func TestGcd(t *testing.T) {
|
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"meatballhat.com/algs4"
|
"github.com/meatballhat/box-o-sand/algs4/go/algs4"
|
||||||
)
|
)
|
||||||
|
|
||||||
const INTS_STRING = `
|
const INTS_STRING = `
|
Loading…
Reference in New Issue
Block a user