From 742e261fdc7079401e2ddf30978b66d554399f9a Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 13 Apr 2026 13:15:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(lint):=20=E5=88=A0=E9=99=A4=20cache=5Ftest.?= =?UTF-8?q?go=20=E4=B8=AD=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 TestContains 和 TestContainsInt,对应的辅助函数已删除 Co-Authored-By: Claude Opus 4.6 --- internal/cache/cache_test.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/internal/cache/cache_test.go b/internal/cache/cache_test.go index 386b7ee..90aee86 100644 --- a/internal/cache/cache_test.go +++ b/internal/cache/cache_test.go @@ -346,21 +346,3 @@ func TestPathMatch(t *testing.T) { }) } } - -func TestContains(t *testing.T) { - if !contains([]string{"GET", "POST"}, "GET") { - t.Error("Expected to find GET") - } - if contains([]string{"GET", "POST"}, "DELETE") { - t.Error("Expected not to find DELETE") - } -} - -func TestContainsInt(t *testing.T) { - if !containsInt([]int{200, 301, 302}, 200) { - t.Error("Expected to find 200") - } - if containsInt([]int{200, 301, 302}, 404) { - t.Error("Expected not to find 404") - } -}