forked from rookie-ninja/rk-entry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (24 loc) · 780 Bytes
/
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
.PHONY: all
all: test lint fmt swag
.PHONY: lint
lint:
@echo "[golangci-lint] Running golangci-lint..."
@golangci-lint run 2>&1
@echo "------------------------------------[Done]"
.PHONY: test
test:
@echo "[test] Running go test..."
@go test ./... -coverprofile coverage.txt 2>&1
@go tool cover -html=coverage.txt
@echo "------------------------------------[Done]"
.PHONY: fmt
fmt:
@echo "[fmt] Formatting go project..."
@gofmt -s -w . 2>&1
@echo "------------------------------------[Done]"
.PHONY: swag
swag:
@echo "[swag] Running swag..."
@swag init --generalInfo entry/common_service_entry.go --output assets/sw/config --propertyStrategy camelcase --markdownFiles assets/docs
@rm -rf assets/sw/config/docs.go
@echo "------------------------------------[Done]"