feat: refactor

This commit is contained in:
Anatoly Antonov 2026-03-28 03:07:13 +09:00
parent 82ef1cb3b8
commit 51bbf3c579
44 changed files with 8589 additions and 0 deletions

40
Makefile Normal file
View file

@ -0,0 +1,40 @@
.PHONY: build run test fmt lint clean generate-ogen help
# Build the application
build:
go build -o predictor ./cmd/api
# Run locally
run:
go run ./cmd/api
# Run tests
test:
go test ./...
# Format code
fmt:
go fmt ./...
# Lint code
lint:
golangci-lint run
# Generate ogen API code from swagger spec
generate-ogen:
go run github.com/ogen-go/ogen/cmd/ogen@latest --target pkg/rest --package rest --clean api/rest/predictor.swagger.yml
# Clean build artifacts
clean:
rm -f predictor
# Show help
help:
@echo "Available commands:"
@echo " build - Build binary"
@echo " run - Run locally"
@echo " test - Run tests"
@echo " fmt - Format code"
@echo " lint - Lint code"
@echo " generate-ogen - Generate API code from swagger spec"
@echo " clean - Remove build artifacts"