This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 13fc4b0  [CALCITE-5758] Initialize connector info map to prevent panic
13fc4b0 is described below

commit 13fc4b076da8adb7eedc50b32f55d0145663fc57
Author: Parag Jain <[email protected]>
AuthorDate: Tue Jun 6 10:45:26 2023 +0530

    [CALCITE-5758] Initialize connector info map to prevent panic
---
 driver.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/driver.go b/driver.go
index fff05e1..b80c2e7 100644
--- a/driver.go
+++ b/driver.go
@@ -58,7 +58,10 @@ type Connector struct {
 
 // NewConnector creates a new connector
 func NewConnector(dsn string) driver.Connector {
-       return &Connector{nil, nil, dsn}
+       return &Connector{
+               Info: make(map[string]string),
+               dsn:  dsn,
+       }
 }
 
 func (c *Connector) Connect(context.Context) (driver.Conn, error) {

Reply via email to