From 230f8abd0434a92c2d6fb5b365812657750d0508 Mon Sep 17 00:00:00 2001 From: yangjianbo Date: Fri, 6 Mar 2026 17:08:37 +0800 Subject: [PATCH] =?UTF-8?q?test(openai):=20=E4=BF=AE=E5=A4=8D=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E6=B5=8B=E8=AF=95=E6=9C=AA=E4=BD=BF=E7=94=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除订阅扣费 stub 中未被使用的状态字段与赋值, 消除 golangci-lint 的 unused 告警,保持回归测试语义不变。 Co-Authored-By: Claude Opus 4.6 --- backend/internal/service/openai_gateway_record_usage_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/internal/service/openai_gateway_record_usage_test.go b/backend/internal/service/openai_gateway_record_usage_test.go index 421f3fec..6fd94a3e 100644 --- a/backend/internal/service/openai_gateway_record_usage_test.go +++ b/backend/internal/service/openai_gateway_record_usage_test.go @@ -44,12 +44,10 @@ type openAIRecordUsageSubRepoStub struct { incrementCalls int incrementErr error - lastAmount float64 } func (s *openAIRecordUsageSubRepoStub) IncrementUsage(ctx context.Context, id int64, costUSD float64) error { s.incrementCalls++ - s.lastAmount = costUSD return s.incrementErr }