Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
31933c8a
Commit
31933c8a
authored
Jan 17, 2026
by
song
Browse files
fix: 删除未使用的字段修复 lint 错误
parent
78bccd03
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/internal/service/antigravity_gateway_service.go
View file @
31933c8a
...
...
@@ -39,14 +39,12 @@ type antigravityRetryLoopParams struct {
body
[]
byte
quotaScope
AntigravityQuotaScope
httpUpstream
HTTPUpstream
accountRepo
AccountRepository
handleError
func
(
ctx
context
.
Context
,
prefix
string
,
account
*
Account
,
statusCode
int
,
headers
http
.
Header
,
body
[]
byte
,
quotaScope
AntigravityQuotaScope
)
}
// antigravityRetryLoopResult 重试循环的结果
type
antigravityRetryLoopResult
struct
{
resp
*
http
.
Response
usedBaseURL
string
}
// antigravityRetryLoop 执行带 URL fallback 的重试循环
...
...
@@ -144,7 +142,7 @@ urlFallbackLoop:
antigravity
.
DefaultURLAvailability
.
MarkSuccess
(
usedBaseURL
)
}
return
&
antigravityRetryLoopResult
{
resp
:
resp
,
usedBaseURL
:
usedBaseURL
},
nil
return
&
antigravityRetryLoopResult
{
resp
:
resp
},
nil
}
// shouldRetryAntigravityError 判断是否应该重试
...
...
@@ -685,7 +683,6 @@ func (s *AntigravityGatewayService) Forward(ctx context.Context, c *gin.Context,
body
:
geminiBody
,
quotaScope
:
quotaScope
,
httpUpstream
:
s
.
httpUpstream
,
accountRepo
:
s
.
accountRepo
,
handleError
:
s
.
handleUpstreamError
,
})
if
err
!=
nil
{
...
...
@@ -1166,7 +1163,6 @@ func (s *AntigravityGatewayService) ForwardGemini(ctx context.Context, c *gin.Co
body
:
wrappedBody
,
quotaScope
:
quotaScope
,
httpUpstream
:
s
.
httpUpstream
,
accountRepo
:
s
.
accountRepo
,
handleError
:
s
.
handleUpstreamError
,
})
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment