Files
gemserve/Makefile
antanst 2ead66f012 Refactor Gemini protocol implementation and improve server architecture
- Move gemini URL parsing from common/ to gemini/ package
- Add structured status codes in gemini/status_codes.go
- Improve error handling with proper Gemini status codes
- Update configuration field naming (Listen -> ListenAddr)
- Add UTF-8 validation for URLs
- Enhance security with better path validation
- Add CLAUDE.md for development guidance
- Include example content in srv/ directory
- Update build system to use standard shell
2025-06-06 15:02:25 +03:00

53 lines
673 B
Makefile

SHELL := /bin/sh
export PATH := $(PATH)
all: fmt lintfix tidy test clean build
clean:
rm -rf ./dist
debug:
@echo "PATH: $(PATH)"
@echo "GOPATH: $(shell go env GOPATH)"
@which go
@which gofumpt
@which gci
@which golangci-lint
# Test
test:
go test ./...
tidy:
go work sync
#go mod tidy
# Format code
fmt:
gofumpt -l -w .
gci write .
# Run linter
lint: fmt
golangci-lint run
# Run linter and fix
lintfix: fmt
golangci-lint run --fix
build:
mkdir -p ./dist
CGO_ENABLED=0 go build -o ./dist/gemserve ./main.go
build-docker: build
docker build -t gemserve .
show-updates:
go list -m -u all
update:
go get -u all
update-patch:
go get -u=patch all