From cdf7396e914255d8817c2c85475aa892557d1475 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Mon, 15 Dec 2025 19:11:03 +0800 Subject: [PATCH] =?UTF-8?q?style(=E7=BB=9F=E4=B8=80=E9=A3=8E=E6=A0=BC):=20?= =?UTF-8?q?interface=E7=BB=9F=E4=B8=80=E4=B8=BAany?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- limit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/limit.go b/limit.go index fd89e16..ab72490 100644 --- a/limit.go +++ b/limit.go @@ -265,14 +265,14 @@ type session struct { // sessionPool 使用 sync.Pool 来复用 session 对象,以减少 GC 压力。 var sessionPool = sync.Pool{ - New: func() interface{} { + New: func() any { return new(session) }, } // fnvHasherPool 使用 sync.Pool 来复用 FNV-1a 哈希对象,以减少高并发下的内存分配。 var fnvHasherPool = sync.Pool{ - New: func() interface{} { + New: func() any { return fnv.New32a() }, }