style: apply gofmt to api/strategy.go and store/strategy.go

This commit is contained in:
Dean
2026-03-27 21:49:34 +08:00
committed by shinchan-zhai
parent c6adc34247
commit f83f2b1c18
2 changed files with 21 additions and 22 deletions

View File

@@ -164,8 +164,8 @@ func (s *Server) handleCreateStrategy(c *gin.Context) {
var req struct {
Name string `json:"name" binding:"required"`
Description string `json:"description"`
Lang string `json:"lang"` // "zh" or "en", used when config is omitted
Config *store.StrategyConfig `json:"config"` // optional — uses default if omitted
Lang string `json:"lang"` // "zh" or "en", used when config is omitted
Config *store.StrategyConfig `json:"config"` // optional — uses default if omitted
}
if err := c.ShouldBindJSON(&req); err != nil {
@@ -452,9 +452,9 @@ func (s *Server) handlePreviewPrompt(c *gin.Context) {
}
var req struct {
Config store.StrategyConfig `json:"config" binding:"required"`
AccountEquity float64 `json:"account_equity"`
PromptVariant string `json:"prompt_variant"`
Config store.StrategyConfig `json:"config" binding:"required"`
AccountEquity float64 `json:"account_equity"`
PromptVariant string `json:"prompt_variant"`
}
if err := c.ShouldBindJSON(&req); err != nil {
@@ -697,4 +697,3 @@ func (s *Server) runRealAITest(userID, modelID, systemPrompt, userPrompt string)
return response, nil
}