-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 839 Bytes
/
Makefile
File metadata and controls
41 lines (33 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.PHONY: lint
lint:
@echo "Running lint scripts.";
@go vet ./...;
@go fmt ./...;
@golangci-lint run --fix=true ./...;
@echo "Done running lint scripts.";
.PHONY: lint-watch
lint-watch:
@reflex --decoration=none -s -- sh -c "clear && $(MAKE) lint";
.PHONY: test
test: lint
@echo "Beginning tests.";
@go test -v -race -vet=off ./...;
@echo "Go tests passed.";
.PHONY: test-example
test-example:
@go test -run=Example ./...;
.PHONY: test-watch
test-watch:
@reflex --decoration=none -s -- sh -c "clear && $(MAKE) test";
.PHONY: bench
bench:
@go test -run=^$ -v -race -benchmem -bench .;
.PHONY: bench-memprofile
bench-memprofile:
@go test -run=^$ -bench=. -benchmem -memprofile mem.out;
.PHONY: analyze-memprofile
analyze-memprofile:
@go tool pprof mem.out;
.PHONY: analyze-build
analyze-build:
@go build -gcflags="-m" .;