go scratch code for atproto

add Makefile

+41
+41
Makefile
··· 1 + 2 + SHELL = /bin/bash 3 + .SHELLFLAGS = -o pipefail -c 4 + 5 + .PHONY: help 6 + help: ## Print info about all commands 7 + @echo "Commands:" 8 + @echo 9 + @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}' 10 + 11 + .PHONY: build 12 + build: ## Build all executables 13 + go build ./cmd/handlr 14 + 15 + .PHONY: all 16 + all: build 17 + 18 + .PHONY: test 19 + test: ## Run tests 20 + go test ./... 21 + 22 + .PHONY: coverage-html 23 + coverage-html: ## Generate test coverage report and open in browser 24 + go test ./... -coverpkg=./... -coverprofile=test-coverage.out 25 + go tool cover -html=test-coverage.out 26 + 27 + .PHONY: lint 28 + lint: ## Verify code style and run static checks 29 + go vet ./... 30 + test -z $(gofmt -l ./...) 31 + 32 + .PHONY: fmt 33 + fmt: ## Run syntax re-formatting (modify in place) 34 + go fmt ./... 35 + 36 + .PHONY: check 37 + check: ## Compile everything, checking syntax (does not output binaries) 38 + go build ./... 39 + 40 + .env: 41 + if [ ! -f ".env" ]; then cp example.dev.env .env; fi