chore: translate Chinese strings to English across repository

This commit is contained in:
2025-12-23 09:52:55 +01:00
parent 4590d46e17
commit ce649f0e18
15 changed files with 99 additions and 59 deletions

View File

@@ -1,50 +1,49 @@
# 定义变量
# Define variables
BIN_DIR := ./bin
APP_NAME := safelineApi
SRC_DIR := ./cmd/safelineApi
VERSION := 1.0.0
BUILD_TIME := $(shell date +"%Y-%m-%dT%H:%M:%S")
# 默认任务
.DEFAULT_GOAL := build
# 构建任务
# Build task
build:
@echo "Building $(APP_NAME) version $(VERSION)..."
mkdir -p $(BIN_DIR)
go build -ldflags "-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME)" -o $(BIN_DIR)/$(APP_NAME) $(SRC_DIR)
# 运行任务
# Run task
run:
@echo "Running $(APP_NAME)..."
$(BIN_DIR)/$(APP_NAME)
# 清理任务
# Clean task
clean:
@echo "Cleaning up..."
rm -rf $(BIN_DIR)
# 测试任务
# Test task
test:
@echo "Running tests..."
go test ./...
# 格式化代码
# Format code
fmt:
@echo "Formatting code..."
go fmt ./...
# 检查代码风格
# Vet code
vet:
@echo "Vetting code..."
go vet ./...
# 安装依赖
# Install dependencies
tidy:
@echo "Tidying dependencies..."
go mod tidy
# 多平台编译
# Cross-platform build
build-all:
@echo "Building for all platforms..."
GOOS=linux GOARCH=amd64 go build -o $(BIN_DIR)/$(APP_NAME)-linux-amd64 $(SRC_DIR)