Skip to content

Commit 552a4b9

Browse files
committed
fix: resolve golangci-lint issues (gofmt, errcheck)
- Fix gofmt alignment in admin_service.go and trailing newline in antigravity_credits_overages.go - Suppress errcheck for fmt.Sscanf in client.go GetMinimumAmount
1 parent 0d2061b commit 552a4b9

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

backend/internal/pkg/antigravity/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (c *AvailableCredit) GetAmount() float64 {
172172
return 0
173173
}
174174
var value float64
175-
fmt.Sscanf(c.CreditAmount, "%f", &value)
175+
_, _ = fmt.Sscanf(c.CreditAmount, "%f", &value)
176176
return value
177177
}
178178

@@ -182,7 +182,7 @@ func (c *AvailableCredit) GetMinimumAmount() float64 {
182182
return 0
183183
}
184184
var value float64
185-
fmt.Sscanf(c.MinimumCreditAmountForUsage, "%f", &value)
185+
_, _ = fmt.Sscanf(c.MinimumCreditAmountForUsage, "%f", &value)
186186
return value
187187
}
188188

backend/internal/service/admin_service.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ type CreateGroupInput struct {
143143
// 无效请求兜底分组 ID(仅 anthropic 平台使用)
144144
FallbackGroupIDOnInvalidRequest *int64
145145
// 模型路由配置(仅 anthropic 平台使用)
146-
ModelRouting map[string][]int64
147-
ModelRoutingEnabled bool // 是否启用模型路由
148-
MCPXMLInject *bool
146+
ModelRouting map[string][]int64
147+
ModelRoutingEnabled bool // 是否启用模型路由
148+
MCPXMLInject *bool
149149
// 支持的模型系列(仅 antigravity 平台使用)
150150
SupportedModelScopes []string
151151
// Sora 存储配额
@@ -182,9 +182,9 @@ type UpdateGroupInput struct {
182182
// 无效请求兜底分组 ID(仅 anthropic 平台使用)
183183
FallbackGroupIDOnInvalidRequest *int64
184184
// 模型路由配置(仅 anthropic 平台使用)
185-
ModelRouting map[string][]int64
186-
ModelRoutingEnabled *bool // 是否启用模型路由
187-
MCPXMLInject *bool
185+
ModelRouting map[string][]int64
186+
ModelRoutingEnabled *bool // 是否启用模型路由
187+
MCPXMLInject *bool
188188
// 支持的模型系列(仅 antigravity 平台使用)
189189
SupportedModelScopes *[]string
190190
// Sora 存储配额

backend/internal/service/antigravity_credits_overages.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,3 @@ func (s *AntigravityGatewayService) handleCreditsRetryFailure(
232232
prefix, modelKey, account.ID, creditsStatusCode, reqErr, truncateForLog(creditsRespBody, 200))
233233
}
234234
}
235-

0 commit comments

Comments
 (0)