mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
fix: resolve golangci-lint errors (gofmt, staticcheck, unused)
- Fix struct field alignment in dto/types.go, settings_view.go, sora_generation_service.go for gofmt compliance - Remove embedded field "Account" from selector in account_handler.go (QF1008) - Remove unused settingService field from SoraGDriveOAuthService - Replace deprecated google.CredentialsFromJSON with CredentialsFromJSONWithParams (SA1019) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea5e5dd9c7
commit
4aada8a336
6 files changed
+19
-21
No files matched your search
@@ -213,8 +213,8 @@ func (h *AccountHandler) buildAccountResponseWithRuntime(ctx context.Context, ac
|
||||
if clients, err := h.gatewayCache.GetAccountAffinityClientsBatch(ctx, accountGroups, service.ClientAffinityTTL); err == nil {
|
||||
if cl, ok := clients[account.ID]; ok {
|
||||
count := int64(len(cl))
|
||||
item.Account.AffinityClientCount = &count
|
||||
item.Account.AffinityClients = cl
|
||||
item.AffinityClientCount = &count
|
||||
item.AffinityClients = cl
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -396,8 +396,8 @@ func (h *AccountHandler) List(c *gin.Context) {
|
||||
if affinityClients != nil {
|
||||
if clients, ok := affinityClients[acc.ID]; ok {
|
||||
count := int64(len(clients))
|
||||
item.Account.AffinityClientCount = &count
|
||||
item.Account.AffinityClients = clients
|
||||
item.AffinityClientCount = &count
|
||||
item.AffinityClients = clients
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user