From 969aa61b9192f364217301421b832b594527ae8f Mon Sep 17 00:00:00 2001 From: Damien Stamates Date: Thu, 11 Oct 2018 11:19:05 -0700 Subject: [PATCH] Added dep files and replaced import from satori/go.uuid to gofrs/uuid --- Gopkg.lock | 28 ++++++++++++++++++++++++++++ Gopkg.toml | 38 ++++++++++++++++++++++++++++++++++++++ glide.lock | 8 -------- glide.yaml | 6 ------ request.go | 6 ++++-- 5 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml delete mode 100644 glide.lock delete mode 100644 glide.yaml diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..bd17d9a --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,28 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + digest = "1:ce579162ae1341f3e5ab30c0dce767f28b1eb6a81359aad01723f1ba6b4becdf" + name = "github.com/gofrs/uuid" + packages = ["."] + pruneopts = "UT" + revision = "370558f003bfe29580cd0f698d8640daccdcc45c" + version = "v3.1.1" + +[[projects]] + digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d" + name = "github.com/gorilla/websocket" + packages = ["."] + pruneopts = "UT" + revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d" + version = "v1.4.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = [ + "github.com/gofrs/uuid", + "github.com/gorilla/websocket", + ] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..e9c83b4 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,38 @@ +# Gopkg.toml example +# +# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/gofrs/uuid" + version = "3.1.1" + +[[constraint]] + name = "github.com/gorilla/websocket" + version = "1.4.0" + +[prune] + go-tests = true + unused-packages = true diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 48c15f6..0000000 --- a/glide.lock +++ /dev/null @@ -1,8 +0,0 @@ -hash: 44c2ecb3fa37d8b11e1adc5bd52ead254a4cd033a392a8bc2e314cd653665651 -updated: 2017-05-05T12:48:19.407875902+02:00 -imports: -- name: github.com/gorilla/websocket - version: 3ab3a8b8831546bd18fd182c20687ca853b2bb13 -- name: github.com/satori/go.uuid - version: 879c5887cd475cd7864858769793b2ceb0d44feb -testImports: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index b4782c4..0000000 --- a/glide.yaml +++ /dev/null @@ -1,6 +0,0 @@ -package: github.com/go-gremlin/gremlin -import: -- package: github.com/gorilla/websocket - version: ^1.1.0 -- package: github.com/satori/go.uuid - version: ^1.1.0 diff --git a/request.go b/request.go index 3e4c9fe..85bfb90 100644 --- a/request.go +++ b/request.go @@ -3,7 +3,8 @@ package gremlin import ( "encoding/json" _ "fmt" - "github.com/satori/go.uuid" + + "github.com/gofrs/uuid" ) type Request struct { @@ -41,7 +42,8 @@ func GraphSONSerializer(req *Request) ([]byte, error) { } mimeType := []byte("application/vnd.gremlin-v2.0+json") var mimeLen = []byte{0x21} - res := append(mimeLen, mimeType...) + var res []byte + res = append(mimeLen, mimeType...) res = append(res, msg...) return res, nil