test(openai): 修复回归测试未使用字段告警

移除订阅扣费 stub 中未被使用的状态字段与赋值,
消除 golangci-lint 的 unused 告警,保持回归测试语义不变。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yangjianbo
2026-03-06 17:08:37 +08:00
parent a18bbb5f2f
commit 230f8abd04

View File

@@ -44,12 +44,10 @@ type openAIRecordUsageSubRepoStub struct {
incrementCalls int incrementCalls int
incrementErr error incrementErr error
lastAmount float64
} }
func (s *openAIRecordUsageSubRepoStub) IncrementUsage(ctx context.Context, id int64, costUSD float64) error { func (s *openAIRecordUsageSubRepoStub) IncrementUsage(ctx context.Context, id int64, costUSD float64) error {
s.incrementCalls++ s.incrementCalls++
s.lastAmount = costUSD
return s.incrementErr return s.incrementErr
} }