Skip to content

Commit 6959af3

Browse files
committed
[CALCITE-6339] Replace hashicorp/go-uuid with google/uuid
1 parent a4daffd commit 6959af3

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

driver.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
"github.com/apache/calcite-avatica-go/v5/hsqldb"
4343
"github.com/apache/calcite-avatica-go/v5/message"
4444
"github.com/apache/calcite-avatica-go/v5/phoenix"
45-
"github.com/hashicorp/go-uuid"
45+
"github.com/google/uuid"
4646
)
4747

4848
// Driver is exported to allow it to be used directly.
@@ -80,7 +80,7 @@ func (c *Connector) Connect(context.Context) (driver.Conn, error) {
8080
c.Info["password"] = config.avaticaPassword
8181
}
8282

83-
connectionId, err := uuid.GenerateUUID()
83+
connectionId, err := uuid.NewRandom()
8484
if err != nil {
8585
return nil, fmt.Errorf("error generating connection id: %w", err)
8686
}
@@ -90,7 +90,7 @@ func (c *Connector) Connect(context.Context) (driver.Conn, error) {
9090
return nil, fmt.Errorf("unable to create HTTP client: %w", err)
9191
}
9292
conn := &conn{
93-
connectionId: connectionId,
93+
connectionId: connectionId.String(),
9494
httpClient: httpClient,
9595
config: config,
9696
connectorInfo: c.Info,

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ module github.com/apache/calcite-avatica-go/v5
33
go 1.17
44

55
require (
6-
github.com/hashicorp/go-uuid v1.0.3
6+
github.com/google/uuid v1.6.0
77
github.com/icholy/digest v0.1.22
88
github.com/jcmturner/gokrb5/v8 v8.4.4
99
google.golang.org/protobuf v1.33.0
1010
)
1111

1212
require (
13+
github.com/hashicorp/go-uuid v1.0.3 // indirect
1314
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
1415
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
1516
github.com/jcmturner/gofork v1.7.6 // indirect

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
55
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
66
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
77
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
8+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
9+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
810
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
911
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
1012
github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=

0 commit comments

Comments
 (0)