aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--go.mod9
-rw-r--r--go.sum10
3 files changed, 26 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 3a532f8..4393260 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,22 @@
+GOPATH?= $(HOME)/go
+
.PHONY: test
-test: lint sqlite ## Run tests and create coverage report
+test: lint ## Run tests and create coverage report
go test -race -short -coverprofile=coverage.txt -covermode=atomic ./...
go tool cover -html=coverage.txt -o coverage.html
-sqlite:
- go get -u $(FLAGS) github.com/mattn/go-sqlite3
- go install $(FLAGS) github.com/mattn/go-sqlite3
-
.PHONY: lint
-lint:
+lint: $(GOPATH)/bin/golint ## Run the code linter
@for file in $$(find . -name 'vendor' -prune -o -type f -name '*.go'); do \
golint $$file; done
+$(GOPATH)/bin/golint:
+ go get -u golang.org/x/lint/golint
+
.PHONY: clean
clean: ## Clean up temp files and binaries
- rm -rf coverage*
+ @rm -rf coverage*
.PHONY: help
help:
diff --git a/go.mod b/go.mod
index 05919a1..4260137 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,10 @@
module src.userspace.com.au/go-migrate
-require github.com/mattn/go-sqlite3 v1.10.0
+require (
+ github.com/mattn/go-sqlite3 v1.10.0
+ golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a // indirect
+ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 // indirect
+ golang.org/x/net v0.0.0-20190313220215-9f648a60d977 // indirect
+ golang.org/x/sys v0.0.0-20190312061237-fead79001313 // indirect
+ golang.org/x/tools v0.0.0-20190313234322-a10017ccd2b9 // indirect
+)
diff --git a/go.sum b/go.sum
index 263c187..3c442ad 100644
--- a/go.sum
+++ b/go.sum
@@ -1,2 +1,12 @@
github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190313234322-a10017ccd2b9/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=