fix(lint): 修复 golangci-lint 检查错误
- 修复未检查的错误返回值 (errcheck) - 移除未使用的 httpClient 字段 (unused) - 修复低效赋值问题 (ineffassign) - 使用 switch 替代 if-else 链 (staticcheck QF1003) - 修复错误字符串首字母大写问题 (staticcheck ST1005) - 运行 gofmt 格式化代码
This commit is contained in:
@@ -1023,6 +1023,10 @@ func (h *AccountHandler) RefreshTier(c *gin.Context) {
|
||||
}
|
||||
|
||||
tierID, storageInfo, err := h.geminiOAuthService.FetchGoogleOneTier(c.Request.Context(), accessToken, proxyURL)
|
||||
if err != nil {
|
||||
response.ErrorFrom(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if account.Extra == nil {
|
||||
account.Extra = make(map[string]any)
|
||||
@@ -1044,10 +1048,10 @@ func (h *AccountHandler) RefreshTier(c *gin.Context) {
|
||||
}
|
||||
|
||||
response.Success(c, gin.H{
|
||||
"tier_id": tierID,
|
||||
"drive_storage_limit": account.Extra["drive_storage_limit"],
|
||||
"drive_storage_usage": account.Extra["drive_storage_usage"],
|
||||
"updated_at": account.Extra["drive_tier_updated_at"],
|
||||
"tier_id": tierID,
|
||||
"drive_storage_limit": account.Extra["drive_storage_limit"],
|
||||
"drive_storage_usage": account.Extra["drive_storage_usage"],
|
||||
"updated_at": account.Extra["drive_tier_updated_at"],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user