diff --git a/driver.go b/driver.go index b80c2e7..faa5ed9 100644 --- a/driver.go +++ b/driver.go @@ -42,7 +42,7 @@ import ( "github.com/apache/calcite-avatica-go/v5/hsqldb" "github.com/apache/calcite-avatica-go/v5/message" "github.com/apache/calcite-avatica-go/v5/phoenix" - "github.com/hashicorp/go-uuid" + "github.com/google/uuid" ) // Driver is exported to allow it to be used directly. @@ -80,7 +80,7 @@ func (c *Connector) Connect(context.Context) (driver.Conn, error) { c.Info["password"] = config.avaticaPassword } - connectionId, err := uuid.GenerateUUID() + connectionId, err := uuid.NewRandom() if err != nil { return nil, fmt.Errorf("error generating connection id: %w", err) } @@ -90,7 +90,7 @@ func (c *Connector) Connect(context.Context) (driver.Conn, error) { return nil, fmt.Errorf("unable to create HTTP client: %w", err) } conn := &conn{ - connectionId: connectionId, + connectionId: connectionId.String(), httpClient: httpClient, config: config, connectorInfo: c.Info, diff --git a/go.mod b/go.mod index 4dcef15..0d93ccf 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,14 @@ module github.com/apache/calcite-avatica-go/v5 go 1.17 require ( - github.com/hashicorp/go-uuid v1.0.3 + github.com/google/uuid v1.6.0 github.com/icholy/digest v0.1.22 github.com/jcmturner/gokrb5/v8 v8.4.4 google.golang.org/protobuf v1.33.0 ) require ( + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect diff --git a/go.sum b/go.sum index f76dc33..38067be 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=