1MEGACHECK := $(GOPATH)/bin/megacheck
2UNAME = $(shell uname -s)
3export GOROOT = $(shell go env GOROOT)
4
5test:
6 go test ./...
7
8race-test:
9 go test -race ./...
10
11$(MEGACHECK):
12ifeq ($(UNAME),Darwin)
13 curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-01-25/megacheck-darwin-amd64
14else
15 curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-01-25/megacheck-linux-amd64
16endif
17 chmod +x $(MEGACHECK)
18
19lint: $(MEGACHECK)
20 $(MEGACHECK) ./...
21 go vet ./...