GitHub user kenshaw opened a pull request:
https://github.com/apache/calcite-avatica-go/pull/24
Change UUID package to github.com/hashicorp/go-uuid
The satori UUID package causes problems with go get and vgo when
building multiple database drivers in the same Go application. This is
because the satori package introduced breaking API changes and has not
tagged it a new version yet.
This change converts the connection ID generation to use the hashicorp
UUID package which was already a dependency of this project, as it is a
dependency of the gokrb package.
This has the added benefit of reducing the number of total package
dependencies by 1.
Additionally, this is needed by github.com/xo/usql so that go get and
vgo build both work "out of the box".
The following is a small Go program that demonstrates that the UUIDs
generated will be the same format:
package main
import (
"log"
guuid "github.com/google/uuid"
huuid "github.com/hashicorp/go-uuid"
suuid "github.com/satori/go.uuid"
)
func main() {
g, err := guuid.NewRandom()
if err != nil {
log.Fatal(err)
}
h, err := huuid.GenerateUUID()
if err != nil {
log.Fatal(err)
}
s, err := suuid.NewV4()
if err != nil {
log.Fatal(err)
}
log.Printf(
"google: %s, hashicorp: %s, satori: %s",
g, h, s,
)
}
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kenshaw/calcite-avatica-go
change-uuid-dependency
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/calcite-avatica-go/pull/24.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #24
----
commit 8c4045dc81301036b70767d96cb27c819d6cead4
Author: Kenneth Shaw <kenshaw@...>
Date: 2018-06-16T01:35:01Z
Change UUID package to github.com/hashicorp/go-uuid
The satori UUID package causes problems with go get and vgo when
building multiple database drivers in the same Go application. This is
because the satori package introduced breaking API changes and has not
tagged it a new version yet.
This change converts the connection ID generation to use the hashicorp
UUID package which was already a dependency of this project, as it is a
dependency of the gokrb package.
This has the added benefit of reducing the number of total package
dependencies by 1.
Additionally, this is needed by github.com/xo/usql so that go get and
vgo build both work "out of the box".
The following is a small Go program that demonstrates that the UUIDs
generated will be the same format:
package main
import (
"log"
guuid "github.com/google/uuid"
huuid "github.com/hashicorp/go-uuid"
suuid "github.com/satori/go.uuid"
)
func main() {
g, err := guuid.NewRandom()
if err != nil {
log.Fatal(err)
}
h, err := huuid.GenerateUUID()
if err != nil {
log.Fatal(err)
}
s, err := suuid.NewV4()
if err != nil {
log.Fatal(err)
}
log.Printf(
"google: %s, hashicorp: %s, satori: %s",
g, h, s,
)
}
----
---