From aa36baf2e5b930f0e89a6107a1d2e090d04fa5a3 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Mon, 29 Oct 2018 17:34:59 -0700 Subject: [PATCH] chore: move to github.com/gofrs/uuid --- Gopkg.toml | 4 ---- manipmemory/manipulator.go | 4 ++-- transaction.go | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Gopkg.toml b/Gopkg.toml index 89753c03..5c879c7d 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,7 +1,3 @@ -[[constraint]] - name = "github.com/satori/go.uuid" - version = "v1.2.0" - [prune] go-tests = true unused-packages = true diff --git a/manipmemory/manipulator.go b/manipmemory/manipulator.go index db7b4308..45564d8d 100644 --- a/manipmemory/manipulator.go +++ b/manipmemory/manipulator.go @@ -5,8 +5,8 @@ import ( "reflect" "sync" + "github.com/gofrs/uuid" memdb "github.com/hashicorp/go-memdb" - uuid "github.com/satori/go.uuid" "go.aporeto.io/elemental" "go.aporeto.io/manipulate" ) @@ -103,7 +103,7 @@ func (s *memdbManipulator) Create(mctx manipulate.Context, objects ...elemental. for _, object := range objects { - object.SetIdentifier(uuid.NewV4().String()) + object.SetIdentifier(uuid.Must(uuid.NewV4()).String()) if err := txn.Insert(object.Identity().Category, object); err != nil { return manipulate.NewErrCannotExecuteQuery(err.Error()) diff --git a/transaction.go b/transaction.go index e5e50122..291e976d 100644 --- a/transaction.go +++ b/transaction.go @@ -1,6 +1,6 @@ package manipulate -import uuid "github.com/satori/go.uuid" +import "github.com/gofrs/uuid" // TransactionID is the type used to define a transcation ID of a store type TransactionID string @@ -8,5 +8,5 @@ type TransactionID string // NewTransactionID returns a new transaction ID. func NewTransactionID() TransactionID { - return TransactionID(uuid.NewV4().String()) + return TransactionID(uuid.Must(uuid.NewV4()).String()) }