-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (23 loc) · 831 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
generate:
go generate -x -run="mockgen" ./...
test:
go test -v -cover ./...
lint:
which golangci-lint || go install github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint run --exclude-dirs example --allow-parallel-runners ./...
gosec:
@go install github.com/securego/gosec/v2/cmd/gosec@latest
@gosec -fmt=json -out="/tmp/gosec.json" -exclude-generated -no-fail ./...
@cat /tmp/gosec.json
# if [ $(shell cat /tmp/gosec.json | jq -r '.Stats.found') -gt 0 ]; then \
# exit 1; \
# fi
spell-check:
go install github.com/client9/misspell/cmd/misspell@latest
find . -type f -name \*.go -ls | xargs misspell -source text -error
examples:
go run example/bootup/main.go
go run example/stop/main.go
go run example/restart/main.go
go run example/advanced/main.go
go run example/auto-restart/main.go