Skip to content

Commit

Permalink
[CALCITE-6339] Replace hashicorp/go-uuid with google/uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
F21 committed Mar 25, 2024
1 parent a4daffd commit 6959af3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 6959af3

Please sign in to comment.