-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (30 loc) · 1.24 KB
/
Makefile
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
#######################################################
############## formats, lint, and tests ###############
#######################################################
.PHONY: fmt
fmt:
@echo "----------------------------------------------------------------"
@echo " ⚙️ Formatting code..."
@echo "----------------------------------------------------------------"
gofmt -s -w ./.
.PHONY: lint
lint:
@echo "----------------------------------------------------------------"
@echo " ⚙️ Linting code..."
@echo "----------------------------------------------------------------"
go run github.com/golangci/golangci-lint/cmd/[email protected] run -E gofmt --config=.golangci.yaml ./...
@echo "Linting complete!"
.PHONY: test
test:
@echo "----------------------------------------------------------------"
@echo " ⚙️ Testing the code..."
@echo "----------------------------------------------------------------"
GOPRIVATE=${PRIVATE_REPOS} go test ./... -v
@echo "Tests complete!"
#######################################################
######################## run #########################
#######################################################
.PHONY: run
run:
@echo "Starting ${BINARY_NAME}..."
GOPRIVATE=${PRIVATE_REPOS} go run ./main.go