Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
F21 committed Mar 4, 2018
1 parent 883c441 commit 2dd3b04
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
16 changes: 8 additions & 8 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
name = "github.com/hashicorp/go-cleanhttp"

[[constraint]]
branch = "master"
name = "github.com/satori/go.uuid"
version = "1.2.0"

[[constraint]]
name = "github.com/xinsnake/go-http-digest-auth-client"
Expand All @@ -47,7 +47,7 @@

[[constraint]]
name = "gopkg.in/jcmturner/gokrb5.v4"
version = "4.1.0"
version = "4.1.1"

[prune]
go-tests = true
Expand Down
10 changes: 7 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ func (a *Driver) Open(dsn string) (driver.Conn, error) {
return nil, fmt.Errorf("Unable to create HTTP client: %s", err)
}

connectionId := uuid.NewV4().String()
connectionId, err := uuid.NewV4()

if err != nil {
return nil, fmt.Errorf("Error generating connection id: %s", err)
}

info := map[string]string{
"AutoCommit": "true",
Expand All @@ -69,7 +73,7 @@ func (a *Driver) Open(dsn string) (driver.Conn, error) {

// Open a connection to the server
req := &message.OpenConnectionRequest{
ConnectionId: connectionId,
ConnectionId: connectionId.String(),
Info: info,
}

Expand All @@ -84,7 +88,7 @@ func (a *Driver) Open(dsn string) (driver.Conn, error) {
}

conn := &conn{
connectionId: connectionId,
connectionId: connectionId.String(),
httpClient: httpClient,
config: config,
}
Expand Down
5 changes: 2 additions & 3 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import (
"net/http"
"os"
"path/filepath"
"strings"
"testing"
"time"

"github.com/satori/go.uuid"
"math/rand"
)

var (
Expand Down Expand Up @@ -56,7 +55,7 @@ func init() {
}

func generateTableName() string {
return "test" + strings.Replace(uuid.NewV4().String(), "-", "", -1)
return fmt.Sprintf("%s%d%d", "test", time.Now().UnixNano(), rand.Intn(100))
}

type DBTest struct {
Expand Down

0 comments on commit 2dd3b04

Please sign in to comment.