From af51eae7f1466e298645018b399be64da0fec038 Mon Sep 17 00:00:00 2001 From: Pavlo Golub Date: Thu, 9 Jan 2025 12:07:41 +0100 Subject: [PATCH] [-] fix SA5011: possible nil pointer dereference (staticcheck) --- driver_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver_test.go b/driver_test.go index 351ab1d..7053a2d 100644 --- a/driver_test.go +++ b/driver_test.go @@ -70,10 +70,10 @@ func TestPoolConfig(t *testing.T) { } c := mock.Config() if c == nil { - t.Error("expected config object, but got nil") + t.Fatal("expected config object, but got nil") } if c.ConnConfig == nil { - t.Error("expected conn config object, but got nil") + t.Fatal("expected conn config object, but got nil") } } @@ -84,6 +84,6 @@ func TestConnConfig(t *testing.T) { } c := mock.Config() if c == nil { - t.Error("expected config object, but got nil") + t.Fatal("expected config object, but got nil") } }