Skip to content

Commit 5e95582

Browse files
committed
Suppress linter errors
1 parent 62a7849 commit 5e95582

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

plugin/plugin_registry_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ func BenchmarkHookRun(b *testing.B) {
326326
)
327327
}
328328
for i := 0; i < b.N; i++ {
329+
//nolint:errcheck
329330
reg.Run(
330331
context.Background(),
331332
map[string]interface{}{

pool/pool_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {
250250
func 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) {
262262
func 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) {
273273
func 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

284284
func 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

Comments
 (0)