refactor: rename binary from quoteforge to qfs
- Rename cmd/server to cmd/qfs for shorter binary name - Update all documentation references (README, CLAUDE.md, etc.) - Update build commands to output bin/qfs - Binary name now matches directory name Usage: go run ./cmd/qfs # Development go build -o bin/qfs ./cmd/qfs # Production Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -134,9 +134,9 @@ Go 1.22+ | Gin | GORM | MariaDB 11 | SQLite (glebarez/sqlite) | htmx + Tailwind
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
```bash
|
```bash
|
||||||
go run ./cmd/server # Dev server
|
go run ./cmd/qfs # Dev server
|
||||||
go run ./cmd/cron -job=X # cleanup-pricelists | update-prices | update-popularity
|
go run ./cmd/cron -job=X # cleanup-pricelists | update-prices | update-popularity
|
||||||
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/quoteforge ./cmd/server
|
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/qfs ./cmd/qfs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Code Style
|
## Code Style
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ localConfigService := services.NewLocalConfigurationService(
|
|||||||
### Шаг 1: Обновить main.go
|
### Шаг 1: Обновить main.go
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// В cmd/server/main.go
|
// В cmd/qfs/main.go
|
||||||
syncService := sync.NewService(pricelistRepo, configRepo, local)
|
syncService := sync.NewService(pricelistRepo, configRepo, local)
|
||||||
|
|
||||||
// Создать isOnline функцию
|
// Создать isOnline функцию
|
||||||
@@ -165,7 +165,7 @@ type PendingChange struct {
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Compile
|
# Compile
|
||||||
go build ./cmd/server
|
go build ./cmd/qfs
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
./quoteforge
|
./quoteforge
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ mysql -u user -p RFQ_LOG < migrations/004_add_price_updated_at.sql
|
|||||||
- `internal/models/configuration.go` - добавлено поле `PriceUpdatedAt`
|
- `internal/models/configuration.go` - добавлено поле `PriceUpdatedAt`
|
||||||
- `internal/services/configuration.go` - добавлен метод `RefreshPrices()`
|
- `internal/services/configuration.go` - добавлен метод `RefreshPrices()`
|
||||||
- `internal/handlers/configuration.go` - добавлен обработчик `RefreshPrices()`
|
- `internal/handlers/configuration.go` - добавлен обработчик `RefreshPrices()`
|
||||||
- `cmd/server/main.go` - добавлен маршрут `/api/configs/:uuid/refresh-prices`
|
- `cmd/qfs/main.go` - добавлен маршрут `/api/configs/:uuid/refresh-prices`
|
||||||
- `web/templates/index.html` - добавлена кнопка и JavaScript функции
|
- `web/templates/index.html` - добавлена кнопка и JavaScript функции
|
||||||
- `migrations/004_add_price_updated_at.sql` - SQL миграция
|
- `migrations/004_add_price_updated_at.sql` - SQL миграция
|
||||||
- `CLAUDE.md` - обновлена документация
|
- `CLAUDE.md` - обновлена документация
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -82,7 +82,7 @@ auth:
|
|||||||
### 3. Миграции базы данных
|
### 3. Миграции базы данных
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go run ./cmd/server -migrate
|
go run ./cmd/qfs -migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Импорт метаданных компонентов
|
### 4. Импорт метаданных компонентов
|
||||||
@@ -95,11 +95,11 @@ go run ./cmd/importer
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Development
|
# Development
|
||||||
go run ./cmd/server
|
go run ./cmd/qfs
|
||||||
|
|
||||||
# Production
|
# Production
|
||||||
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/quoteforge ./cmd/server
|
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/qfs ./cmd/qfs
|
||||||
./bin/quoteforge
|
./bin/qfs
|
||||||
```
|
```
|
||||||
|
|
||||||
Приложение будет доступно по адресу: http://localhost:8080
|
Приложение будет доступно по адресу: http://localhost:8080
|
||||||
@@ -209,13 +209,13 @@ go run ./cmd/cron -job=update-popularity
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Запуск в режиме разработки (hot reload)
|
# Запуск в режиме разработки (hot reload)
|
||||||
go run ./cmd/server
|
go run ./cmd/qfs
|
||||||
|
|
||||||
# Запуск тестов
|
# Запуск тестов
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
# Сборка для Linux
|
# Сборка для Linux
|
||||||
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/quoteforge ./cmd/server
|
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/qfs ./cmd/qfs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Переменные окружения
|
## Переменные окружения
|
||||||
|
|||||||
Reference in New Issue
Block a user