@@ -40,18 +40,18 @@ func createTestClient(t *testing.T, cfg testClientConfig) (Client, string) {
4040 client , err := NewClient (config )
4141 require .NoError (t , err , "failed to create client" )
4242 require .NotNil (t , client , "client should not be nil" )
43- t .Cleanup (func () { client .Close () })
43+ t .Cleanup (func () { _ = client .Close () })
4444
4545 return client , buf .String ()
4646}
4747
4848// TestDHTModeSelection tests DHT mode configuration (server/client/default)
4949func TestDHTModeSelection (t * testing.T ) {
5050 tests := []struct {
51- name string
52- dhtMode string
53- expectedLogMsg string
54- additionalMsgOpt string // optional additional message to check
51+ name string
52+ dhtMode string
53+ expectedLogMsg string
54+ additionalMsgOpt string // optional additional message to check
5555 }{
5656 {
5757 name : "default mode (empty string defaults to server)" ,
@@ -252,10 +252,10 @@ func TestP2PClientTypeAlias(t *testing.T) {
252252 p2pClient , err = NewClient (config )
253253 require .NoError (t , err )
254254 require .NotNil (t , p2pClient )
255- defer p2pClient .Close ()
255+ defer func () { _ = p2pClient .Close () } ()
256256
257257 // Verify it's also a Client
258- var client Client = p2pClient
258+ client : = p2pClient
259259 assert .NotNil (t , client )
260260}
261261
@@ -280,7 +280,7 @@ func BenchmarkDHTServerMode(b *testing.B) {
280280 b .Fatal (err )
281281 }
282282 if client != nil {
283- client .Close ()
283+ _ = client .Close ()
284284 }
285285 }
286286}
@@ -305,7 +305,7 @@ func BenchmarkDHTClientMode(b *testing.B) {
305305 b .Fatal (err )
306306 }
307307 if client != nil {
308- client .Close ()
308+ _ = client .Close ()
309309 }
310310 }
311311}
0 commit comments