github.com/miguelgrubin/gin-boilerplate@v0.0.0-20231208120009-f8f00c6d4138/Makefile (about) 1 .PHONY: help all test test/cover clean 2 3 help: ## Show this help. 4 @echo "Makefile commnads list\n" 5 @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' 6 install: ## Install dependencies with go mod 7 go mod vendor 8 build: ## Clean & Compile 9 rm -f bin/* 10 go build -o bin/app -race 11 run: build 12 cd bin && ./app create-config 13 cd bin && ./app serve 14 lint: ## Show lint errors 15 revive -config revive.toml -exclude vendor/... -formatter friendly ./... 16 sec: ## Show security errors 17 gosec ./... 18 format: ## Apply format to all files 19 gofmt -s -w . 20 test: ## Run all tests 21 go test ./... -v 22 coverage: ## Run all tests and show coverage 23 go test ./... -coverprofile=coverage.out ./... 24 go tool cover -func=coverage.out 25 go tool cover -html=coverage.out 26 start: ## Run hot-reload server 27 air 28 debug: ## Run server on debug mode 29 dlv debug