style: apply go fmt to fix indentation and alignment

Fix formatting issues across multiple files:
- logger/decision_logger.go: correct if statement indentation
- main.go: fix DataKLineTime field tab alignment
- trader/auto_trader.go: align struct field comments and code blocks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZhouYongyou
2025-11-04 10:44:15 +08:00
parent 57309dd0d2
commit db7b24e2e0
3 changed files with 9 additions and 9 deletions

View File

@@ -349,7 +349,7 @@ func (l *DecisionLogger) AnalyzePerformance(lookbackCycles int) (*PerformanceAna
symbol := action.Symbol symbol := action.Symbol
side := "" side := ""
if action.Action == "open_long" || action.Action == "close_long" || action.Action == "partial_close" || action.Action == "auto_close_long" { if action.Action == "open_long" || action.Action == "close_long" || action.Action == "partial_close" || action.Action == "auto_close_long" {
side = "long" side = "long"
} else if action.Action == "open_short" || action.Action == "close_short" || action.Action == "auto_close_short" { } else if action.Action == "open_short" || action.Action == "close_short" || action.Action == "auto_close_short" {
side = "short" side = "short"

View File

@@ -37,7 +37,7 @@ type ConfigFile struct {
StopTradingMinutes int `json:"stop_trading_minutes"` StopTradingMinutes int `json:"stop_trading_minutes"`
Leverage LeverageConfig `json:"leverage"` Leverage LeverageConfig `json:"leverage"`
JWTSecret string `json:"jwt_secret"` JWTSecret string `json:"jwt_secret"`
DataKLineTime string `json:"data_k_line_time"` DataKLineTime string `json:"data_k_line_time"`
News []config.NewsConfig `json:"news"` News []config.NewsConfig `json:"news"`
} }

View File

@@ -113,11 +113,11 @@ type AutoTrader struct {
lastResetTime time.Time lastResetTime time.Time
stopUntil time.Time stopUntil time.Time
isRunning bool isRunning bool
startTime time.Time // 系统启动时间 startTime time.Time // 系统启动时间
callCount int // AI调用次数 callCount int // AI调用次数
positionFirstSeenTime map[string]int64 // 持仓首次出现时间 (symbol_side -> timestamp毫秒) positionFirstSeenTime map[string]int64 // 持仓首次出现时间 (symbol_side -> timestamp毫秒)
lastPositions map[string]*PositionSnapshot // 上一个周期的持仓快照 (symbol_side -> snapshot) lastPositions map[string]*PositionSnapshot // 上一个周期的持仓快照 (symbol_side -> snapshot)
newsProcessor []news.Provider // 新闻 newsProcessor []news.Provider // 新闻
} }
// NewAutoTrader 创建自动交易器 // NewAutoTrader 创建自动交易器