summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--pkg/server/server.go9
3 files changed, 8 insertions, 7 deletions
diff --git a/go.mod b/go.mod
index eb8f489c..2ab35308 100644
--- a/go.mod
+++ b/go.mod
@@ -10,6 +10,7 @@ require (
github.com/eapache/queue v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.4.2 // indirect
github.com/golang/protobuf v1.0.0
+ github.com/google/uuid v1.1.1
github.com/hashicorp/hcl v0.0.0-20170509225359-392dba7d905e // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jessevdk/go-flags v1.3.0
@@ -20,7 +21,6 @@ require (
github.com/pelletier/go-buffruneio v0.2.0 // indirect
github.com/pelletier/go-toml v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5
github.com/sirupsen/logrus v0.0.0-20170713114250-a3f95b5c4235
github.com/spf13/afero v0.0.0-20170217164146-9be650865eab // indirect
github.com/spf13/cast v1.1.0 // indirect
diff --git a/go.sum b/go.sum
index 9e418553..42cda42b 100644
--- a/go.sum
+++ b/go.sum
@@ -16,6 +16,8 @@ github.com/fsnotify/fsnotify v1.4.2 h1:v5tKwtf2hNhBV24eNYfQ5UmvFOGlOCmRqk7/P1olx
github.com/fsnotify/fsnotify v1.4.2/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/protobuf v1.0.0 h1:lsek0oXi8iFE9L+EXARyHIjU5rlWIhhTkjDz3vHhWWQ=
github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/hcl v0.0.0-20170509225359-392dba7d905e h1:KJWs1uTCkN3E/J5ofCH9Pf8KKsibTFc3fv0CA9+WsVo=
github.com/hashicorp/hcl v0.0.0-20170509225359-392dba7d905e/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
@@ -36,8 +38,6 @@ github.com/pelletier/go-toml v1.0.0 h1:QFDlmAXZrfPXEF6c9+15fMqhQIS3O0pxszhnk936v
github.com/pelletier/go-toml v1.0.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5 h1:tfcGHuraNSEY9xRb9ckCMqMD7xAjzrYI1WpD7DA+nz8=
-github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sirupsen/logrus v0.0.0-20170713114250-a3f95b5c4235 h1:a2XWU6egUZQhD52o2GEKr79zE+OuZmwLybyOQpoqhHQ=
github.com/sirupsen/logrus v0.0.0-20170713114250-a3f95b5c4235/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/spf13/afero v0.0.0-20170217164146-9be650865eab h1:IVAbBHQR8rXL2Fc8Zba/lMF7KOnTi70lqdx91UTuAwQ=
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 75921ec1..647843da 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -26,7 +26,7 @@ import (
"time"
"github.com/eapache/channels"
- uuid "github.com/satori/go.uuid"
+ uuid "github.com/google/uuid"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
@@ -1996,9 +1996,10 @@ func (s *BgpServer) AddPath(ctx context.Context, r *api.AddPathRequest) (*api.Ad
if err != nil {
return err
}
- id, _ := uuid.NewV4()
- s.uuidMap[id] = pathTokey(path)
- uuidBytes = id.Bytes()
+ if id, err := uuid.NewRandom(); err == nil {
+ s.uuidMap[id] = pathTokey(path)
+ uuidBytes, _ = id.MarshalBinary()
+ }
return nil
}, true)
return &api.AddPathResponse{Uuid: uuidBytes}, err