| 1 |
## help: 💡 Display available commands |
| 2 |
.PHONY: help |
| 3 |
help: |
| 4 |
@echo '⚡️ GoFiber/Fiber Development:' |
| 5 |
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' |
| 6 |
|
| 7 |
## audit: 🚀 Conduct quality checks |
| 8 |
.PHONY: audit |
| 9 |
audit: |
| 10 |
go mod verify |
| 11 |
go vet ./... |
| 12 |
go run golang.org/x/vuln/cmd/govulncheck@latest ./... |
| 13 |
|
| 14 |
## benchmark: 📈 Benchmark code performance |
| 15 |
.PHONY: benchmark |
| 16 |
benchmark: |
| 17 |
go test ./... -benchmem -bench=. -run=^Benchmark_$ |
| 18 |
|
| 19 |
## coverage: ☂️ Generate coverage report |
| 20 |
.PHONY: coverage |
| 21 |
coverage: |
| 22 |
go run gotest.tools/[email protected] -f testname -- ./... -race -count=1 -coverprofile=coverage.out -covermode=atomic |
| 23 |
go tool cover -html=coverage.out -o coverage.html |
| 24 |
open coverage.html & |
| 25 |
|
| 26 |
## format: 🎨 Fix code format issues |
| 27 |
.PHONY: format |
| 28 |
format: |
| 29 |
go run mvdan.cc/gofumpt@latest -w -l . |
| 30 |
|
| 31 |
## benchfmt: 📝 Format README benchmark lines |
| 32 |
.PHONY: benchfmt |
| 33 |
benchfmt: |
| 34 |
go run ./scripts/format_benchmarks.go |
| 35 |
|
| 36 |
## lint: 🚨 Run lint checks |
| 37 |
.PHONY: lint |
| 38 |
lint: |
| 39 |
go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./... |
| 40 |
|
| 41 |
## modernize: ♻️ Check for outdated patterns |
| 42 |
.PHONY: modernize |
| 43 |
modernize: |
| 44 |
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test=false ./... |
| 45 |
|
| 46 |
## test: 🚦 Execute all tests |
| 47 |
.PHONY: test |
| 48 |
test: |
| 49 |
go run gotest.tools/[email protected] -f testname -- ./... -race -count=1 -shuffle=on |
| 50 |
|
| 51 |
## tidy: 📌 Clean and tidy dependencies |
| 52 |
.PHONY: tidy |
| 53 |
tidy: |
| 54 |
go mod tidy -v |