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 42 43 44 45 46 47 48 49 50 51 52 53 54
|
## help: 💡 Display available commands
.PHONY: help
help:
@echo '⚡️ GoFiber/Fiber Development:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## audit: 🚀 Conduct quality checks
.PHONY: audit
audit:
go mod verify
go vet ./...
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
## benchmark: 📈 Benchmark code performance
.PHONY: benchmark
benchmark:
go test ./... -benchmem -bench=. -run=^Benchmark_$
## coverage: ☂️ Generate coverage report
.PHONY: coverage
coverage:
go run gotest.tools/gotestsum@v1.13.0 -f testname -- ./... -race -count=1 -coverprofile=coverage.out -covermode=atomic
go tool cover -html=coverage.out -o coverage.html
open coverage.html &
## format: 🎨 Fix code format issues
.PHONY: format
format:
go run mvdan.cc/gofumpt@latest -w -l .
## benchfmt: 📝 Format README benchmark lines
.PHONY: benchfmt
benchfmt:
go run ./scripts/format_benchmarks.go
## lint: 🚨 Run lint checks
.PHONY: lint
lint:
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 run ./...
## modernize: ♻️ Check for outdated patterns
.PHONY: modernize
modernize:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test=false ./...
## test: 🚦 Execute all tests
.PHONY: test
test:
go run gotest.tools/gotestsum@v1.13.0 -f testname -- ./... -race -count=1 -shuffle=on
## tidy: 📌 Clean and tidy dependencies
.PHONY: tidy
tidy:
go mod tidy -v
|