routewatch/Makefile
sneak 7d39bd18bc Fix concurrent map write panic in timeout middleware
- Add thread-safe header wrapper in timeoutWriter
- Check context cancellation before writing responses in handlers
- Protect header access after timeout with mutex
- Prevents race condition when requests timeout while handlers are still running
2025-07-28 21:54:58 +02:00

30 lines
517 B
Makefile

export DEBUG = routewatch
.PHONY: test fmt lint build clean run asupdate
all: test
test: lint
go test -v ./...
fmt:
go fmt ./...
lint:
go vet ./...
golangci-lint run
build:
CGO_ENABLED=1 go build -o bin/routewatch cmd/routewatch/main.go
clean:
rm -rf bin/
run: build
DEBUG=routewatch ./bin/routewatch 2>&1 | tee log.txt
asupdate:
@echo "Updating AS info data..."
@go run cmd/asinfo-gen/main.go | gzip > pkg/asinfo/asdata.json.gz.tmp && \
mv pkg/asinfo/asdata.json.gz.tmp pkg/asinfo/asdata.json.gz