@@ -235,7 +235,7 @@ func BenchmarkPool_PutPop(b *testing.B) {
235235 pool := NewPool (context .Background (), config .EmptyPoolCapacity )
236236 defer pool .Clear ()
237237 for i := 0 ; i < b .N ; i ++ {
238- pool .Put ("client1.ID" , "client1" )
238+ pool .Put ("client1.ID" , "client1" ) //nolint:errcheck
239239 pool .Pop ("client1.ID" )
240240 }
241241}
@@ -250,8 +250,8 @@ func BenchmarkPool_Clear(b *testing.B) {
250250func BenchmarkPool_ForEach (b * testing.B ) {
251251 pool := NewPool (context .Background (), config .EmptyPoolCapacity )
252252 defer pool .Clear ()
253- pool .Put ("client1.ID" , "client1" )
254- pool .Put ("client2.ID" , "client2" )
253+ pool .Put ("client1.ID" , "client1" ) //nolint:errcheck
254+ pool .Put ("client2.ID" , "client2" ) //nolint:errcheck
255255 for i := 0 ; i < b .N ; i ++ {
256256 pool .ForEach (func (key , value interface {}) bool {
257257 return true
@@ -262,8 +262,8 @@ func BenchmarkPool_ForEach(b *testing.B) {
262262func BenchmarkPool_Get (b * testing.B ) {
263263 pool := NewPool (context .Background (), config .EmptyPoolCapacity )
264264 defer pool .Clear ()
265- pool .Put ("client1.ID" , "client1" )
266- pool .Put ("client2.ID" , "client2" )
265+ pool .Put ("client1.ID" , "client1" ) //nolint:errcheck
266+ pool .Put ("client2.ID" , "client2" ) //nolint:errcheck
267267 for i := 0 ; i < b .N ; i ++ {
268268 pool .Get ("client1.ID" )
269269 pool .Get ("client2.ID" )
@@ -273,19 +273,19 @@ func BenchmarkPool_Get(b *testing.B) {
273273func BenchmarkPool_GetOrPut (b * testing.B ) {
274274 pool := NewPool (context .Background (), config .EmptyPoolCapacity )
275275 defer pool .Clear ()
276- pool .Put ("client1.ID" , "client1" )
277- pool .Put ("client2.ID" , "client2" )
276+ pool .Put ("client1.ID" , "client1" ) //nolint:errcheck
277+ pool .Put ("client2.ID" , "client2" ) //nolint:errcheck
278278 for i := 0 ; i < b .N ; i ++ {
279- pool .GetOrPut ("client1.ID" , "client1" )
280- pool .GetOrPut ("client2.ID" , "client2" )
279+ pool .GetOrPut ("client1.ID" , "client1" ) //nolint:errcheck
280+ pool .GetOrPut ("client2.ID" , "client2" ) //nolint:errcheck
281281 }
282282}
283283
284284func BenchmarkPool_Remove (b * testing.B ) {
285285 pool := NewPool (context .Background (), config .EmptyPoolCapacity )
286286 defer pool .Clear ()
287287 for i := 0 ; i < b .N ; i ++ {
288- pool .Put ("client1.ID" , "client1" )
288+ pool .Put ("client1.ID" , "client1" ) //nolint:errcheck
289289 pool .Remove ("client1.ID" )
290290 }
291291}
0 commit comments