routewatch/Makefile
sneak ee80311ba1 Add asinfo package for AS number information lookups
- Created pkg/asinfo with embedded AS data from ipverse/asn-info
- Provides fast lookups by ASN with GetDescription() and GetHandle()
- Includes Search() functionality for finding AS by name/handle
- Added asinfo-gen tool to fetch and convert CSV data to JSON
- Added 'make asupdate' target to refresh AS data
- Embedded JSON data contains 130k+ AS entries
- Added comprehensive tests and examples
2025-07-27 21:41:02 +02:00

30 lines
451 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:
go build -o bin/routewatch cmd/routewatch/main.go
clean:
rm -rf bin/
run: build
./bin/routewatch
asupdate:
@echo "Updating AS info data..."
@go run cmd/asinfo-gen/main.go > pkg/asinfo/asdata.json.tmp && \
mv pkg/asinfo/asdata.json.tmp pkg/asinfo/asdata.json